凤凰通过上传批量csv文件命令不明白?

时间:2017-07-17 11:20:27

标签: csv hadoop hbase phoenix bigdata

我想使用phonix上传批量csv文件,但我无法理解下面的命令。你能详细解释一下吗?

  HADOOP_CLASSPATH=$(hbase mapredcp):/path/to/hbase/conf hadoop jar phoenix-<version>-client.jar org.apache.phoenix.mapreduce.CsvBulkLoadTool --table EXAMPLE --input /data/example.csv

我从以下网站获取此命令。 https://phoenix.apache.org/bulk_dataload.html

1 个答案:

答案 0 :(得分:0)

我不确定你是否还在寻找答案。但在这里。您首先设置HADOOP_CLASSPATH,然后使用jar选项调用可执行文件“hadoop”以查找phoenix客户端jar和要使用参数运行的类。 以下内容可以帮助您了解hadoop命令的用法(尝试在ssh shell上键入hadoop)

 Usage: hadoop [--config confdir] [COMMAND | CLASSNAME]
  CLASSNAME            run the class named CLASSNAME
 or
  where COMMAND is one of:
  fs                   run a generic filesystem user client
  version              print the version
  jar <jar>            run a jar file
                       note: please use "yarn jar" to launch
                             YARN applications, not this command.
  checknative [-a|-h]  check native hadoop and compression libraries availability
  distcp <srcurl> <desturl> copy file or directories recursively
  envvars              display computed Hadoop environment variables
  archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive
  classpath            prints the class path needed to get the
  credential           interact with credential providers
                       Hadoop jar and the required libraries
  daemonlog            get/set the log level for each daemon
  trace                view and modify Hadoop tracing settings

Most commands print help when invoked w/o parameters.