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

8hhllhi2  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(326)

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

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

j0pj023g

j0pj023g1#

我不确定你是否还在寻找答案。但它在这里。首先设置hadoop\u类路径,然后使用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.

相关问题