Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> connecting Hbase using java


+
Alok Singh Mahor 2013-03-30, 14:02
+
Ted Yu 2013-03-30, 14:49
+
Mohammad Tariq 2013-03-30, 15:25
+
Stephen Boesch 2013-03-30, 15:29
+
Alok Singh Mahor 2013-03-31, 03:00
+
Ted Yu 2013-03-31, 03:39
+
Alok Singh Mahor 2013-03-31, 10:48
+
Ted Yu 2013-03-31, 14:37
+
Alok Singh Mahor 2013-03-31, 16:46
+
Ted Yu 2013-03-31, 19:04
+
Alok Singh Mahor 2013-03-31, 20:51
+
Alok Singh Mahor 2013-04-03, 16:37
+
Andrea Gazzarini 2013-04-03, 16:59
+
Harsha 2013-04-03, 21:20
Copy link to this message
-
Re: connecting Hbase using java
thank you Harsha
with your advice I used command to compile that example code
alok@alok:~/exp/hbase/exp$ javac -classpath
`~/packages/hbase-0.94.6/bin/hbase classpath` HBaseExample.java

so errors reduced to 15 from 18
could you please what else I have to add

please see the error

alok@alok:~/exp/hbase/exp$ javac -classpath
`~/packages/hbase-0.94.6/bin/hbase classpath` HBaseExample.java
HBaseExample.java:5: error: cannot find symbol
import org.apache.hadoop.hbase.client.Scanner;
                                     ^
  symbol:   class Scanner
  location: package org.apache.hadoop.hbase.client
HBaseExample.java:6: error: cannot find symbol
import org.apache.hadoop.hbase.io.BatchUpdate;
                                 ^
  symbol:   class BatchUpdate
  location: package org.apache.hadoop.hbase.io
HBaseExample.java:7: error: cannot find symbol
import org.apache.hadoop.hbase.io.Cell;
                                 ^
  symbol:   class Cell
  location: package org.apache.hadoop.hbase.io
HBaseExample.java:8: error: cannot find symbol
import org.apache.hadoop.hbase.io.RowResult;
                                 ^
  symbol:   class RowResult
  location: package org.apache.hadoop.hbase.io
HBaseExample.java:20: error: cannot find symbol
        BatchUpdate batchUpdate = new BatchUpdate("test_row1");
        ^
  symbol:   class BatchUpdate
  location: class HBaseExample
HBaseExample.java:20: error: cannot find symbol
        BatchUpdate batchUpdate = new BatchUpdate("test_row1");
                                      ^
  symbol:   class BatchUpdate
  location: class HBaseExample
HBaseExample.java:25: error: cannot find symbol
        Cell cell = table.get("test_row1", "columnfamily1:column1");
        ^
  symbol:   class Cell
  location: class HBaseExample
HBaseExample.java:25: error: no suitable method found for get(String,String)
        Cell cell = table.get("test_row1", "columnfamily1:column1");
                         ^
    method HTable.get(List<Get>) is not applicable
      (actual and formal argument lists differ in length)
    method HTable.get(Get) is not applicable
      (actual and formal argument lists differ in length)
HBaseExample.java:31: error: cannot find symbol
        RowResult singleRow = table.getRow(Bytes.toBytes("test_row1"));
        ^
  symbol:   class RowResult
  location: class HBaseExample
HBaseExample.java:31: error: cannot find symbol
        RowResult singleRow = table.getRow(Bytes.toBytes("test_row1"));
                                   ^
  symbol:   method getRow(byte[])
  location: variable table of type HTable
HBaseExample.java:32: error: cannot find symbol
        Cell cell = singleRow.get(Bytes.toBytes("columnfamily1:column1"));
        ^
  symbol:   class Cell
  location: class HBaseExample
HBaseExample.java:42: error: cannot find symbol
        Scanner scanner = table.getScanner(
        ^
  symbol:   class Scanner
  location: class HBaseExample
HBaseExample.java:42: error: no suitable method found for
getScanner(String[])
        Scanner scanner = table.getScanner(
                               ^
    method HTable.getScanner(byte[],byte[]) is not applicable
      (actual and formal argument lists differ in length)
    method HTable.getScanner(byte[]) is not applicable
      (actual argument String[] cannot be converted to byte[] by method
invocation conversion)
    method HTable.getScanner(Scan) is not applicable
      (actual argument String[] cannot be converted to Scan by method
invocation conversion)
HBaseExample.java:46: error: cannot find symbol
        RowResult rowResult = scanner.next();
        ^
  symbol:   class RowResult
  location: class HBaseExample
HBaseExample.java:55: error: cannot find symbol
        for (RowResult result : scanner) {
             ^
  symbol:   class RowResult
  location: class HBaseExample
Note: HBaseExample.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
15 errors
On Thu, Apr 4, 2013 at 2:50 AM, Harsha <[EMAIL PROTECTED]> wrote:

+
Jean-Marc Spaggiari 2013-04-04, 00:24
+
Alok Singh Mahor 2013-04-04, 09:04
+
Jean-Marc Spaggiari 2013-04-04, 12:06
+
Alok Singh Mahor 2013-04-04, 13:13
+
Jean-Marc Spaggiari 2013-04-04, 13:38
+
Alok Singh Mahor 2013-04-04, 14:37
+
Jean-Marc Spaggiari 2013-04-04, 14:41
+
Alok Singh Mahor 2013-04-04, 14:50
+
Jean-Marc Spaggiari 2013-04-04, 15:13
+
Alok Singh Mahor 2013-04-05, 03:38
+
Jean-Marc Spaggiari 2013-04-05, 11:47
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB