You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2014/07/14 22:02:05 UTC

[jira] [Created] (PHOENIX-1084) Use same split logic for intra region splits over local indexes

James Taylor created PHOENIX-1084:
-------------------------------------

             Summary: Use same split logic for intra region splits over local indexes
                 Key: PHOENIX-1084
                 URL: https://issues.apache.org/jira/browse/PHOENIX-1084
             Project: Phoenix
          Issue Type: Sub-task
            Reporter: rajeshbabu
            Assignee: rajeshbabu


We currently have two separate classes that represent a column family/column qualifier combo: ColumnReference and ReferencingColumn. I believe the only difference is that ReferencingColumn allows a backing byte array to be used with an offset and length. Since ColumnReference already has an ImmutableBytesPtr we can add a constructor that takes two offsets and lengths for the family and qualifier and do a bit of minor refactoring (removing the family and qualifier member variables and just use the familyPtr and qualifierPtr ones exclusivly) so that we don't have two classes for the same thing:
{code}
public class ColumnReference implements Comparable<ColumnReference> {
    
  public ColumnReference(byte[] family, int familyOffset, int familyLength, byte[] qualifier, int qualifierOffset, int qualiferLength) {
    this.familyPtr = new ImmutableBytesPtr(family, familyOffset, familyLength);
    this.qualifierPtr = new ImmutableBytesPtr(qualifier, qualifierOffset, qualifierLength);
    this.hashCode = calcHashCode(familyPtr.get(), qualifierPtr.get());
  }
{code}

Another useful addition would be to implement Writable so we don't duplicate the serialization logic.




--
This message was sent by Atlassian JIRA
(v6.2#6252)