如何在GitHub上的别人的分支上获取分支?(How do I fetch a branch on someone else's fork on GitHub? [duplicate])
这个问题已经在这里有一个答案:
- 如何从其他人的回购中提取远程分支 3个答案
我从GitHub的一个回购中分了出来。 我想从另一个用户的分支上的分支获取代码。
我必须克隆这个用户的整个repo到一个单独的本地repo,或者我可以做一些像
git checkout link_to_the_other_users_branch
?This question already has an answer here:
I've forked from a repo on GitHub. I want to get the code from a branch on another user's fork.
Must I clone this user's whole repo to a separate local repo or can I do something like
git checkout link_to_the_other_users_branch
?
原文:https://stackoverflow.com/questions/9153598
最满意答案
我会说这更多的是效率 - 通过linux头命令管理hadoop fs -cat的输出可以轻松地复制一个头。
hadoop fs -cat /path/to/file | head
这是有效的,因为在输出所需数量的行之后,头将关闭底层流
以这种方式使用尾巴的效率要低得多 - 因为您必须流过整个文件(所有HDFS块)才能找到最终的x行数。
hadoop fs -cat /path/to/file | tail
hadoop fs -tail命令可以在最后一个千字节的hadoop上有效地找到最后一个块,并跳到最后一个千字节的位置,然后输出输出。 通过尾巴的管道不能轻易做到这一点。
I would say it's more to do with efficiency - a head can easily be replicated by piping the output of a hadoop fs -cat through the linux head command.
hadoop fs -cat /path/to/file | head
This is efficient as head will close out the underlying stream after the desired number of lines have been output
Using tail in this manner would be considerably less efficient - as you'd have to stream over the entire file (all HDFS blocks) to find the final x number of lines.
hadoop fs -cat /path/to/file | tail
The hadoop fs -tail command as you note works on the last kilobyte - hadoop can efficiently find the last block and skip to the position of the final kilobyte, then stream the output. Piping via tail can't easily do this.
相关问答
更多-
hadoop文件系统的设置 用hadoop fs -ls命令出现错误[2023-09-19]
查看logs的namenode日志。可能的问题:1.防火墙要关闭 2.namenode的安全模式关闭 3.文件的权限问题,更改权限。 -
hadoop fs -mkdir input hadoop:未找到命令[2023-05-07]
path里没配hadoop的bin的路径 -
hadoop文件系统的设置 用hadoop fs -ls命令出现错误[2022-06-14]
查看logs的namenode日志。可能的问题:1.防火墙要关闭 2.namenode的安全模式关闭 3.文件的权限问题,更改权限。 -
hadoop fs -mkdir /input hadoop:未找到命令[2022-04-23]
如果你已经进入hadoop/bin目录下,应该是 ./hadoop fs -mkdir /input 如果你没有进入hadoop/bin目录,你应该打全路径或相对路径 假设你的hadoop安装在/home/hadoop下,你可以打 /home/hadoop/bin/hadoop fs -mkdir /input 一般情况下你都在/home/hadoop默认目录下,你可以打 bin/hadoop fs -mkdir /input -
perl里怎么执行hadoop命令[2023-05-29]
$Hadoop=`which hadoop`; #这里加上一句 print "$Hadoop fs -get .....\n"; `$Hadoop fs -get ......`; 看看打印出来的命令是不是你想要的,如果是你想要的,就手动执行一遍。 有问题继续追问。 -
我会说这更多的是效率 - 通过linux头命令管理hadoop fs -cat的输出可以轻松地复制一个头。 hadoop fs -cat /path/to/file | head 这是有效的,因为在输出所需数量的行之后,头将关闭底层流 以这种方式使用尾巴的效率要低得多 - 因为您必须流过整个文件(所有HDFS块)才能找到最终的x行数。 hadoop fs -cat /path/to/file | tail hadoop fs -tail命令可以在最后一个千字节的hadoop上有效地找到最后一个块,并跳到 ...
-
Hadoop Pig fs测试命令(Hadoop Pig fs test command)[2023-12-23]
使用命令行工具并运行hadoop fs -help并获得: -test -[defsz]: Answer various questions about , with result via exit status. -d return 0 if is a directory. -e return 0 if exists. -f return 0 if is a file. -s return 0 ... -
使用MAPRFS运行`hadoop fs`时如何启用其他日志记录?(How to enable additional logging when running `hadoop fs` with MAPRFS?)[2022-11-09]
您也可以直接使用该选项 hadoop mfs -Dfs.mapr.trace=DEBUG -ls maprfs://maprfs.example.com/tmp/1GB.img You can also use the option directly hadoop mfs -Dfs.mapr.trace=DEBUG -ls maprfs://maprfs.example.com/tmp/1GB.img -
可以通过shell访问hadoop fs,但不能通过java main访问(Can access hadoop fs through shell, but not through java main)[2021-12-17]
你有一个版本不匹配 - 你的问题注意到NameNode运行版本0.20.1 + 169.89(我认为是来自Cloudera发行版CDH2 - http://archive.cloudera.com/cdh/2/ ),并在IntelliJ你正在使用Apache hadoop 2.2.0版。 更新IntelliJ类路径以使用与群集版本兼容的jar - 即: hadoop-0.20.1+169.89-core.jar You have a version mismatch - your questions not ... -
这是我们如何做到的。 刚写了一个快速的shell脚本。 LOCAL_DIR=/tmp/txt mkdir $LOCAL_DIR for F in `hadoop fs -fs hdfs://namenode.mycluster -lsr / | grep '/*.txt$' | awk '{print $NF}'; do hadoop fs -fs hdfs://namenode.mycluster -copyToLocal $F $LOCAL_DIR done` Here's how we ...