You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@crunch.apache.org by "Micah Whitacre (JIRA)" <ji...@apache.org> on 2012/12/04 20:08:58 UTC

[jira] [Created] (CRUNCH-123) HBaseTarget should support PCollection

Micah Whitacre created CRUNCH-123:
-------------------------------------

             Summary: HBaseTarget should support PCollection<Delete>
                 Key: CRUNCH-123
                 URL: https://issues.apache.org/jira/browse/CRUNCH-123
             Project: Crunch
          Issue Type: Improvement
          Components: Core
            Reporter: Micah Whitacre
            Assignee: Josh Wills


Currently the HBaseTarget implementation does not accept PCollection<Delete> because of the following code in HBaseTarget.

{quote}
@Override
  public boolean accept(OutputHandler handler, PType<?> ptype) {
    if (Put.class.equals(ptype.getTypeClass())) {
      handler.configure(this, ptype);
      return true;
    }
    return false;
  }
{quote}

The TableOutputFormat supports deletes so it seems like a change to the if statement to check if the ptype.getTypeClass() equals Delete.class is all that is needed.

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

[jira] [Updated] (CRUNCH-123) HBaseTarget should support PCollection

Posted by "Josh Wills (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CRUNCH-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Josh Wills updated CRUNCH-123:
------------------------------

    Attachment: CRUNCH-123v2.patch

Tweaked this slightly to support Hadoop-2.0.0. Will commit now. Thanks Micah!
                
> HBaseTarget should support PCollection<Delete>
> ----------------------------------------------
>
>                 Key: CRUNCH-123
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-123
>             Project: Crunch
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Micah Whitacre
>            Assignee: Josh Wills
>         Attachments: crunch-123.patch, CRUNCH-123v2.patch
>
>
> Currently the HBaseTarget implementation does not accept PCollection<Delete> because of the following code in HBaseTarget.
> {quote}
> @Override
>   public boolean accept(OutputHandler handler, PType<?> ptype) {
>     if (Put.class.equals(ptype.getTypeClass())) {
>       handler.configure(this, ptype);
>       return true;
>     }
>     return false;
>   }
> {quote}
> The TableOutputFormat supports deletes so it seems like a change to the if statement to check if the ptype.getTypeClass() equals Delete.class is all that is needed.

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

[jira] [Commented] (CRUNCH-123) HBaseTarget should support PCollection

Posted by "Josh Wills (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CRUNCH-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510035#comment-13510035 ] 

Josh Wills commented on CRUNCH-123:
-----------------------------------

Micah, thanks for this, the patch looks great. I'm going to run it through the integration tests w/crunch.platform=1 and crunch.platform=2 and then commit it.
                
> HBaseTarget should support PCollection<Delete>
> ----------------------------------------------
>
>                 Key: CRUNCH-123
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-123
>             Project: Crunch
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Micah Whitacre
>            Assignee: Josh Wills
>         Attachments: crunch-123.patch
>
>
> Currently the HBaseTarget implementation does not accept PCollection<Delete> because of the following code in HBaseTarget.
> {quote}
> @Override
>   public boolean accept(OutputHandler handler, PType<?> ptype) {
>     if (Put.class.equals(ptype.getTypeClass())) {
>       handler.configure(this, ptype);
>       return true;
>     }
>     return false;
>   }
> {quote}
> The TableOutputFormat supports deletes so it seems like a change to the if statement to check if the ptype.getTypeClass() equals Delete.class is all that is needed.

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

[jira] [Updated] (CRUNCH-123) HBaseTarget should support PCollection

Posted by "Micah Whitacre (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CRUNCH-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Micah Whitacre updated CRUNCH-123:
----------------------------------

    Attachment: crunch-123.patch

Patch with the change.  Also modified the integration tests to now issue deletes to verify the HBaseTarget accepts deletes.
                
> HBaseTarget should support PCollection<Delete>
> ----------------------------------------------
>
>                 Key: CRUNCH-123
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-123
>             Project: Crunch
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Micah Whitacre
>            Assignee: Josh Wills
>         Attachments: crunch-123.patch
>
>
> Currently the HBaseTarget implementation does not accept PCollection<Delete> because of the following code in HBaseTarget.
> {quote}
> @Override
>   public boolean accept(OutputHandler handler, PType<?> ptype) {
>     if (Put.class.equals(ptype.getTypeClass())) {
>       handler.configure(this, ptype);
>       return true;
>     }
>     return false;
>   }
> {quote}
> The TableOutputFormat supports deletes so it seems like a change to the if statement to check if the ptype.getTypeClass() equals Delete.class is all that is needed.

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

[jira] [Resolved] (CRUNCH-123) HBaseTarget should support PCollection

Posted by "Josh Wills (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CRUNCH-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Josh Wills resolved CRUNCH-123.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 0.5.0
    
> HBaseTarget should support PCollection<Delete>
> ----------------------------------------------
>
>                 Key: CRUNCH-123
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-123
>             Project: Crunch
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Micah Whitacre
>            Assignee: Josh Wills
>             Fix For: 0.5.0
>
>         Attachments: crunch-123.patch, CRUNCH-123v2.patch
>
>
> Currently the HBaseTarget implementation does not accept PCollection<Delete> because of the following code in HBaseTarget.
> {quote}
> @Override
>   public boolean accept(OutputHandler handler, PType<?> ptype) {
>     if (Put.class.equals(ptype.getTypeClass())) {
>       handler.configure(this, ptype);
>       return true;
>     }
>     return false;
>   }
> {quote}
> The TableOutputFormat supports deletes so it seems like a change to the if statement to check if the ptype.getTypeClass() equals Delete.class is all that is needed.

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