Thanks for the reply. Will look into your suggestions.

-----Original Message-----
From: Lewis John Mcgibbney [mailto:[email protected]] 
Sent: Wednesday, May 29, 2013 7:09 PM
To: [email protected]
Subject: Re: Extracting status code from hbase

OH, BTW I meant to refer you to the test in line 178 of [0]. testPutNested hth 
Lewis


On Wed, May 29, 2013 at 7:07 PM, Lewis John Mcgibbney < 
[email protected]> wrote:

> This is most certainly better aimed at either Gora or HBase lists.
> Obtaining better (and consistent) understanding and of course 
> abstracting users from such data structures is what we have been 
> addressing in current Gora development. (See GORA-174) You will want 
> to look specifically at some of the testing we do for this stuff over 
> in Goran namely in [0-1].
> Specifically, the Query API in Gora for some data store 
> implementations could `probably` do with some attention... so please 
> voice you opinion over on user@gora if it tickles your fancy.
> Thanks
> Lewis
>
>
> [0]
> http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/ap
> ache/gora/store/DataStoreTestBase.java?view=markup
> [1]
> http://svn.apache.org/viewvc/gora/trunk/gora-core/src/examples/avro/we
> bpage.json?view=markup
>
>
> On Wed, May 29, 2013 at 3:55 PM, Shah, Nishant <[email protected]> wrote:
>
>> Hi Everyone,
>>
>> I got my error. I was trying to use toString for a field which is int 
>> or float or long. But this leads me to another question.
>> The protocol status is a nested structure. Similar to parseStatus. 
>> How could we parse these to get the individual majorcode, minorcode,args ?
>> Also, how to detect if a url has returned a 404, or 200 or any other 
>> status code ?
>> Thanks.
>>
>> -----Original Message-----
>> From: Shah, Nishant
>> Sent: Wednesday, May 29, 2013 1:51 PM
>> To: [email protected]
>> Subject: Extracting status code from hbase
>>
>> Hi Everyone,
>>
>> I have my Nutch 2.1 setup with Hbase. Once I am done with the crawl, 
>> I want to extract all the information from the column family 'f'.
>> For this I do,
>>
>> Scan s = new Scan();
>> ResultScanner scanner = table.getScanner(s); try { // Scanners return 
>> Result instances.
>> // Now, for the actual iteration. One way is to use a while loop // 
>> like
>> so:
>> for (Result rr = scanner.next(); rr != null; rr = scanner.next()) { 
>> // print out the row we found and the columns we were looking // for 
>> System.out.println("Found row: " + rr); String[] 
>> rrs=getColumnsInColumnFamily(rr,"f");
>> NavigableMap familyMap = rr.getFamilyMap(Bytes.toBytes("f"));
>> Iterator entries = familyMap.entrySet().iterator(); 
>> while(entries.hasNext()){
>>
>> Entry thisEntry = (Entry) entries.next(); Object key = 
>> thisEntry.getKey(); Object val = thisEntry.getValue();
>> System.out.println(Bytes.toString((byte[])
>> key)+"="+Bytes.toString((byte[]) val)); }
>>
>> The value for status is blank. It's not null, but blank. Same is the 
>> case with headers. 'mtdt' family and rest of the 'f' family is fine.
>> Can anyone suggest why this is happening ?
>> Thanks,
>> Nishant
>>
>
>
>
> --
> *Lewis*
>



--
*Lewis*

Reply via email to