accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: Specify Range for data in specific column family
Date Tue, 01 Sep 2015 03:57:45 GMT
Keith Turner wrote:
> On Mon, Aug 31, 2015 at 8:27 PM, z11373<z11373@outlook.com>  wrote:
>
>> >  Hi Josh,
>> >  Apologize that I still don't get it.
>> >  How to pass it to the AccumuloInputFormat?
>> >  If there is no way to do so (means I have to change the code), then I'd
>> >  think about it.
>> >  Right now the existing code already using AIF, and I just want to tweak the
>> >  Range condition.
>> >
>
> Look not in Range but in AccumuloInputFormat methods and you will find the
> method you seek.
>
>

Ack, yeah, sorry for the run-around. I spaced on the fact that you said 
your were using the InputFormat.

http://accumulo.apache.org/1.6/apidocs/org/apache/accumulo/core/client/mapreduce/InputFormatBase.html#fetchColumns-org.apache.hadoop.mapreduce.Job-java.util.Collection-

In your case, you'd want to do something like:

`AccumuloInputFormat.fetchColumns(job, Arrays.asList(new 
Pair<Text,Text>(new Text(myColfam), null));`

(sorry if you're using the mapred libraries instead of mapreduce 
libraries -- note the java package. Both will have the same method, one 
just accepts a Job and the other a JobConf to match both mapreduce APIs 
from Hadoop)

Mime
View raw message