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 >> AggregateProtocol Help


+
Tom Wilcox 2011-12-22, 16:09
+
Ted Yu 2011-12-22, 17:03
+
Tom Wilcox 2011-12-23, 11:02
+
Ted Yu 2011-12-23, 15:04
+
Gary Helmling 2011-12-23, 18:05
+
Royston Sellman 2012-01-01, 17:35
+
Ted Yu 2012-01-01, 17:58
+
Royston Sellman 2012-01-01, 19:26
+
yuzhihong@... 2012-01-01, 19:53
+
Himanshu Vashishtha 2012-01-02, 01:18
+
Ted Yu 2012-01-02, 01:53
+
Gary Helmling 2012-01-02, 06:23
+
Royston Sellman 2012-01-03, 16:32
+
Ted Yu 2012-01-03, 17:09
+
Royston Sellman 2012-01-03, 17:48
+
Ted Yu 2012-01-03, 18:00
+
Himanshu Vashishtha 2012-01-03, 18:14
+
Royston Sellman 2012-01-03, 18:42
+
Ted Yu 2012-01-03, 18:58
+
Ted Yu 2012-01-03, 21:31
+
Royston Sellman 2012-01-04, 11:43
+
Ted Yu 2012-01-04, 15:01
+
Royston Sellman 2012-01-04, 18:57
Copy link to this message
-
Re: AggregateProtocol Help
Hello Royston (and Tom),

Its a bit confusing. -1 is defined in your code, and the default value
(in case it was returning just default) from the RS is 0.
Can you enable DEBUG at Region Server and paste it to pastebin.
I assume the conf object is correctly configured?

Thanks,
Himanshu
On Tue, Jan 3, 2012 at 9:32 AM, Royston Sellman
<[EMAIL PROTECTED]> wrote:
> Hi Ted, Himanshu, Gary,
>
> Thanks again for your attention. I experimented with a shorter table and it
> looks like the timeout error was spurious...
>
> With the shorter table I now get an NPE when I call AggregationClient.sum().
> Here's the code snippet:
>
>                // Test the table
>                HTable table = new HTable(EDRP_TABLE);
>                Get get = new Get(Bytes.toBytes("row-aa"));
>                get.addColumn(Bytes.toBytes("EDRP"),
> Bytes.toBytes("advanceKWh"));
>                Result result = table.get(get);
>                byte [] val = result.getValue(Bytes.toBytes("EDRP"),
> Bytes.toBytes("advanceKWh"));
>                System.out.println("Row aa = " + Bytes.toString(val));
>
>                AggregationClient aClient = new AggregationClient(conf);
>                Scan scan = new Scan();
>                scan.addColumn(EDRP_FAMILY, EDRP_QUALIFIER);
>                scan.setStartRow(Bytes.toBytes("row-ab"));
>                scan.setStopRow(Bytes.toBytes("row-az"));
>                System.out.println(Bytes.toString(EDRP_FAMILY) + ":" +
> Bytes.toString(EDRP_QUALIFIER));
>                final ColumnInterpreter<Long, Long> ci = new
> LongColumnInterpreter();
>                long sum=-1;
>                try {
>                        sum = aClient.sum(EDRP_TABLE, ci, scan);
>                } catch (Throwable e) {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                }
>                System.out.println(sum);
>
> The first part is just to check that my table is OK. It prints the correct
> value for row aa. Then I check CF:CQ is correct. Then I get the -1 that sum
> was defined as. Then the NPE. Here is the run output:
>
> Row aa = 3.0
> EDRP:advanceKWh
> -1
> java.lang.NullPointerException
>  at EDRPAggregator.testSumWithValidRange(EDRPAggregator.java:66)
>  at EDRPAggregator.main(EDRPAggregator.java:96)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
>
> Line 66 is the line:
>                        sum = aClient.sum(EDRP_TABLE, ci, scan);
>
> But I'm not sure that is really the line generating the NPE because I get
> the -1 output (same result when line 66 is not wrapped in try-catch BTW).
> Anyway, -1 is clearly not the correct value for the sum.
>
> [Note: I'm setting a start and end row on the scan because I saw a comment
> in AggregationClient.java saying they must be set. However, I think this
> comment is obsolete as the test code in TestAggregateProtocol.java sometimes
> does not include start & end rows. The run is exactly the same without the
> start & stop rows ]
>
> We are struggling with Aggregations not least because
> TestAggregateProtocol.java is the only source of example code we could find
> and it is not ideal because it is designed to work with MiniCluster rather
> than a real cluster like ours. Is there any other example code in existence?
> I think that would really help us.
>
> Meanwhile, thanks for your patience with our questions. We are really
> impressed with the AggregationProtocol architecture/functionality and very
> keen to use it.
>
> Royston (and Tom)
>
> -----Original Message-----
> From: Gary Helmling [mailto:[EMAIL PROTECTED]]
> Sent: 02 January 2012 06:23
> To: [EMAIL PROTECTED]
> Subject: Re: AggregateProtocol Help
+
Royston Sellman 2012-01-03, 17:54
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