hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Yates (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-7702) Adding filtering to Import jobs
Date Tue, 29 Jan 2013 22:33:13 GMT

     [ https://issues.apache.org/jira/browse/HBASE-7702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jesse Yates updated HBASE-7702:
-------------------------------

    Attachment: hbase-7702_0.94-v2.patch

Attaching a slightly updated version for 0.94. Main changes are adding a 'setup config' method
for the filter:
{code}
  /**
   * Add a Filter to be instantiated on import
   * @param conf Configuration to update (will be passed to the job)
   * @param clazz {@link Filter} subclass to instantiate on the server. 
   * @param args List of arguments to pass to the filter on instantiation
   */
  public static void addFilterAndArguments(Configuration conf, Class<? extends Filter>
clazz,
      List<String> args) {
    conf.set(Import.FILTER_CLASS_CONF_KEY, clazz.getName());

    // build the param string for the key
    StringBuilder builder = new StringBuilder();
    for (int i = 0; i < args.size(); i++) {
      String arg = args.get(i);
      builder.append(arg);
      if (i != args.size() - 1) {
        builder.append(",");
      }
    }
    conf.set(Import.FILTER_ARGS_CONF_KEY, builder.toString());
  }
{code}

I'll update the trunk patch if people are happy with this addition
                
> Adding filtering to Import jobs
> -------------------------------
>
>                 Key: HBASE-7702
>                 URL: https://issues.apache.org/jira/browse/HBASE-7702
>             Project: HBase
>          Issue Type: Bug
>          Components: mapreduce
>            Reporter: Jesse Yates
>            Assignee: Jesse Yates
>             Fix For: 0.96.0, 0.94.5
>
>         Attachments: hbase-7702_0.94-v0.patch, hbase-7702_0.94-v1.patch, hbase-7702_0.94-v2.patch,
hbase-7702_trunk-v0.patch, hbase-7702_trunk-v1.patch
>
>
> Add the ability to filter to the Import MapReduce job.
> Often times when restoring a table from an Export job, its not desirable to import all
the rows, but rather just a subset. This adds the abililty to just import rows to the table
that pass a given filter.
> This is the complement to HBASE-2495

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message