[jira] [Updated] (PHOENIX-1060) Replace ReferencingColumn with ColumnReference

2015-03-07 Thread Rajeshbabu Chintaguntla (JIRA)

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

Rajeshbabu Chintaguntla updated PHOENIX-1060:
-
Attachment: PHOENIX-1060_4.0.patch

patch for 4.0

 Replace ReferencingColumn with ColumnReference
 --

 Key: PHOENIX-1060
 URL: https://issues.apache.org/jira/browse/PHOENIX-1060
 Project: Phoenix
  Issue Type: Sub-task
Reporter: rajeshbabu
Assignee: Rajeshbabu Chintaguntla
Priority: Minor
 Fix For: 5.0.0, 4.3.1

 Attachments: PHOENIX-1060.patch, PHOENIX-1060_4.0.patch, 
 PHOENIX-1060_v2.patch, PHOENIX-1060_v3.patch


 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 ComparableColumnReference {
 
   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.3.4#6332)


[jira] [Updated] (PHOENIX-1060) Replace ReferencingColumn with ColumnReference

2015-03-06 Thread Rajeshbabu Chintaguntla (JIRA)

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

Rajeshbabu Chintaguntla updated PHOENIX-1060:
-
Attachment: PHOENIX-1060_v2.patch

Thanks for the review [~jamestaylor].
Here is the Patch addressing the comments.
bq. Might be cleanest to just add a ReadOnlyImmutableBytesPtr as this might 
come up again.
Added ReadOnlyImmutableBytesPtr.
bq. An alternative might be to get rid of those methods, but there are probably 
a lot of callers (though it's possible they could all be converted to be ok 
with an ImmutableBytesWritable).
It's not good because most of the places we want family or qualifier preparing 
filters,scan objects which will not accept ImmutableBytesWritable mostly. So 
just creating family,qualifier byte arrays on demand. 

 Replace ReferencingColumn with ColumnReference
 --

 Key: PHOENIX-1060
 URL: https://issues.apache.org/jira/browse/PHOENIX-1060
 Project: Phoenix
  Issue Type: Sub-task
Reporter: rajeshbabu
Assignee: Rajeshbabu Chintaguntla
Priority: Minor
 Fix For: 5.0.0, 4.3.1

 Attachments: PHOENIX-1060.patch, PHOENIX-1060_v2.patch


 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 ComparableColumnReference {
 
   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.3.4#6332)


[jira] [Updated] (PHOENIX-1060) Replace ReferencingColumn with ColumnReference

2015-03-04 Thread Rajeshbabu Chintaguntla (JIRA)

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

Rajeshbabu Chintaguntla updated PHOENIX-1060:
-
Attachment: PHOENIX-1060.patch

Sorry I missed this. Here is the patch [~jamestaylor].

 Replace ReferencingColumn with ColumnReference
 --

 Key: PHOENIX-1060
 URL: https://issues.apache.org/jira/browse/PHOENIX-1060
 Project: Phoenix
  Issue Type: Sub-task
Reporter: rajeshbabu
Assignee: rajeshbabu
Priority: Minor
 Attachments: PHOENIX-1060.patch


 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 ComparableColumnReference {
 
   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.3.4#6332)


[jira] [Updated] (PHOENIX-1060) Replace ReferencingColumn with ColumnReference

2014-07-14 Thread James Taylor (JIRA)

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

James Taylor updated PHOENIX-1060:
--

Priority: Minor  (was: Major)

 Replace ReferencingColumn with ColumnReference
 --

 Key: PHOENIX-1060
 URL: https://issues.apache.org/jira/browse/PHOENIX-1060
 Project: Phoenix
  Issue Type: Sub-task
Reporter: rajeshbabu
Assignee: rajeshbabu
Priority: Minor

 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 ComparableColumnReference {
 
   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)


[jira] [Updated] (PHOENIX-1060) Replace ReferencingColumn with ColumnReference

2014-07-04 Thread James Taylor (JIRA)

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

James Taylor updated PHOENIX-1060:
--

Description: 
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 ComparableColumnReference {

  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.


  was:When data region split corresponding index region also should split to 
ensure co-location. At the same time we should ensure index region data split 
properly into it's daughter regions. 


 Replace ReferencingColumn with ColumnReference
 --

 Key: PHOENIX-1060
 URL: https://issues.apache.org/jira/browse/PHOENIX-1060
 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 ComparableColumnReference {
 
   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)