title: Import csv files to hbase
body: <p>I want fill mytable:Province in hbase using csv file. To do this, I used the following command:</p>
  
  <pre><code>bin/hbase org.apache.hadoop.hbase.mapreduce.importtsv -Dimport.columns=
  HBASE_ROW_KEY,ProvinceINFO:ID, ProvinceINFO:Name Province /usr/data/province.csv
  </code></pre>
  
  <p>but it gives me this error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase
  /mapreduce
  Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.mapreduce
  at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
  Could not find the main class: org.apache.hadoop.hbase.mapreduce. Program will exit.
  </code></pre>
  
  <p>So, to solve this I did the following:</p>
  
  <p>copy hbase.site.xml to hadoop/conf</p>
  
  <p>copy all hbase jar files  and zookeeper.jar and guava.jar into hadoop/lib  </p>
  
  <p>and set <code>HADOOP_CLASSPATH</code>  and <code>HBASE_pATH</code> as you can see in following:</p>
  
  <pre><code>export HADOOP_CLASSPATH=/Desktop/hbase/lib/hbase-client-0.95.0-hadoop2.jar:/Desktop  
  /hbase/lib/hbase-common-0.95.0-hadoop2.jar:/Desktop/hbase/lib/hbase-common-0.95.0-
  hadoop2-tests.jar:/Desktop/hbase/lib/hbase-examples-0.95.0-hadoop2.jar:/Desktop/hbase
  /lib/hbase-hadoop2-compat-0.95.0-hadoop2.jar:/Desktop/hbase/lib/hbase-hadoop-compat-
  0.95.0-hadoop2.jar:/Desktop/hbase/lib/hbase-it-0.95.0-hadoop2.jar:/Desktop/hbase
  /lib/hbase-it-0.95.0-hadoop2-tests.jar:/Desktop/hbase/lib/hbase-prefix-tree-0.95.0-
  hadoop2.jar:/Desktop/hbase/lib/hbase-protocol-0.95.0-hadoop2.jar:$/Desktop/hbase
  /lib/hbase-server-0.95.0-hadoop2.jar:$/Desktop/hbase/lib/hbase-server-0.95.0-hadoop2-
  tests.jar:/Desktop/hbase/lib/guava-12.0.1.jar:/Desktop/hbase/conf:/Desktop/hbase
  /lib/zookeeper-3.4.5.
  </code></pre>
  
  <p>But it does not change.</p>
  
  <p>Please guide me</p>