Hi,

We have tried using the following command in the shell without success :

hbase org.apache.hadoop.hbase.mapreduce.Import -Dimport.filter.class=org.
apache.hadoop.hbase.filter.SingleColumnValueFilter
-Dimport.filter.args='Bytes.toBytes("t")','Bytes.toBytes("trt")','=','new
BinaryComparator (Bytes.toBytes("imp"))' tracking-test-backup
tracking-export

hbase org.apache.hadoop.hbase.mapreduce.Import
-Dimport.filter.class=org.apache.hadoop.hbase.filter.SingleColumnValueFilter
-Dimport.filter.args='Bytes.toBytes("t")','Bytes.toBytes("trt")','CompareFilter.CompareOp.valueOf("EQUAL")','new
BinaryComparator (Bytes.toBytes("imp"))' tracking-test-backup
tracking-export

hbase org.apache.hadoop.hbase.mapreduce.Import
-Dimport.filter.class=org.apache.hadoop.hbase.filter.SingleColumnValueFilter
-Dimport.filter.args='Bytes.toBytes("t")','Bytes.toBytes("trt")','CompareFilter.CompareOp.EQUAL','new
BinaryComparator (Bytes.toBytes("imp"))' tracking-test-backup
tracking-export

Thanks for you reply.


On Mon, Nov 18, 2013 at 4:09 PM, Ted Yu <[email protected]> wrote:

> bq. -Dimport.filter.args=<args>
>
> Can you show us your <args> ?
>
> BTW from SingleColumnValueFilter.createFilterFromArguments(), you can find
> the correct order of arguments:
>
>     byte [] family =
> ParseFilter.removeQuotesFromByteArray(filterArguments.get(0));
>     byte [] qualifier =
> ParseFilter.removeQuotesFromByteArray(filterArguments.get(1));
>     CompareOp compareOp =
> ParseFilter.createCompareOp(filterArguments.get(2));
>
>
> On Mon, Nov 18, 2013 at 1:42 AM, Nicolas Phung <[email protected]
> >wrote:
>
> > Hello,
> >
> > We are using HBase hbase-0.94.6+132 with cloudera distribution. We're
> > trying to do a selective taImport with HBase filter, but can't get it
> work:
> >
> >
> http://stackoverflow.com/questions/20007190/hbase-import-command-line-with-filter
> >
> > I don't know if it's really possible but the command prompt suggest it
> is.
> > We manage to find the following ticket
> > https://issues.apache.org/jira/browse/HBASE-7702 but haven't been able
> to
> > use it for the command line.
> >
> > If anyone can send me some pointers on whatever this is really possible
> or
> > now and how to do it properly.
> >
> > Thanks.
> >
> > Nicolas
> >
>



-- 
*Nicolas Phung** - Big Data Engineer*[email protected]<[email protected]>
[image: --------------------------------------------------][image:
powerspace] <http://www.powerspace.com/>Powerspace France | 13 rue de
Turbigo | 75002 Paris
fax. +34 935 504 359 - www.powerspace.com[image:
--------------------------------------------------][image:
In]<http://www.linkedin.com/companies/powerspace?trk=fc_badge>[image:
t] <http://twitter.com/pwspace>Hot Jobs in
Barcelona<http://www.powerspace.com/jobs>

Reply via email to