[jira] [Commented] (TRAFODION-1530) Replace calls to Mutation.getFamilyMap, they cause an incompatibility

2015-11-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15003452#comment-15003452
 ] 

ASF GitHub Bot commented on TRAFODION-1530:
---

Github user asfgit closed the pull request at:

https://github.com/apache/incubator-trafodion/pull/166


> Replace calls to Mutation.getFamilyMap, they cause an incompatibility
> -
>
> Key: TRAFODION-1530
> URL: https://issues.apache.org/jira/browse/TRAFODION-1530
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: dtm
>Affects Versions: 1.1 (pre-incubation)
> Environment: Certain HBase versions, for example 
> hbase-0.98.6-cdh5.3.0.
>Reporter: Hans Zeller
>
> Some of the Trafodion code calls the getFamilyMap() method on classes derived 
> from Mutation, such as Put.
> This method is missing in some HBase 0.98.x version. It seems to be there in 
> 0.98.1 and gone in 0.98.6, at least in the CDH versions.
> See HBASE-10339. The method also seems to be gone in HBase 1 and 2, so we can 
> hopefully replace it with the new method getFamilyCellMap().
> This will be required to be able to run Trafodion with Apache HBase.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1530) Replace calls to Mutation.getFamilyMap, they cause an incompatibility

2015-11-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15001641#comment-15001641
 ] 

ASF GitHub Bot commented on TRAFODION-1530:
---

Github user mashengchen commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/166#discussion_r44618328
  
--- Diff: 
core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/SingleVersionDeleteNotSupported.java
 ---
@@ -53,13 +54,15 @@ public SingleVersionDeleteNotSupported() {
  * mechansim will currently treat DeleteColumn the same as Delete 
which could cause confusion.
  */
 public static void validateDelete(final Delete delete) throws 
SingleVersionDeleteNotSupported {
-Collection> values = delete.getFamilyMap().values();
-for (List value : values) {
-for (KeyValue kv : value) {
-if (Type.Delete.getCode() == kv.getType()) {
+Collection> values = delete.getFamilyCellMap().values();
+for (List value : values) {
+for (Cell cell : value) {
+KeyValue kv = new KeyValue(cell);
--- End diff --

got it


> Replace calls to Mutation.getFamilyMap, they cause an incompatibility
> -
>
> Key: TRAFODION-1530
> URL: https://issues.apache.org/jira/browse/TRAFODION-1530
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: dtm
>Affects Versions: 1.1 (pre-incubation)
> Environment: Certain HBase versions, for example 
> hbase-0.98.6-cdh5.3.0.
>Reporter: Hans Zeller
>
> Some of the Trafodion code calls the getFamilyMap() method on classes derived 
> from Mutation, such as Put.
> This method is missing in some HBase 0.98.x version. It seems to be there in 
> 0.98.1 and gone in 0.98.6, at least in the CDH versions.
> See HBASE-10339. The method also seems to be gone in HBase 1 and 2, so we can 
> hopefully replace it with the new method getFamilyCellMap().
> This will be required to be able to run Trafodion with Apache HBase.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1530) Replace calls to Mutation.getFamilyMap, they cause an incompatibility

2015-11-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15001629#comment-15001629
 ] 

ASF GitHub Bot commented on TRAFODION-1530:
---

Github user mashengchen commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/166#discussion_r44617837
  
--- Diff: 
core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/SsccTransactionalTable.java
 ---
@@ -692,22 +693,23 @@ public SsccPutMultipleTransactionalResponse 
call(SsccRegionService instance) thr
 
}

-   // validate for well-formedness
-   public void validatePut(final Put put) throws IllegalArgumentException {
-   if (put.isEmpty()) {
-   throw new IllegalArgumentException("No columns to 
insert");
-   }
-   if (maxKeyValueSize > 0) {
-   for (List list : put.getFamilyMap().values()) 
{
-   for (KeyValue kv : list) {
-   if (kv.getLength() > maxKeyValueSize) {
-   throw new 
IllegalArgumentException(
-   "KeyValue size 
too large");
-   }
-   }
-   }
-   }
-   }
+// validate for well-formedness
+public void validatePut(final Put put) throws IllegalArgumentException 
{
+if (put.isEmpty()) {
+throw new IllegalArgumentException("No columns to insert");
+}
+if (maxKeyValueSize > 0) {
--- End diff --

yes, the code is never executed, also in KeyValue source code, it 
restricted the size itself.
but i guess the person who code here will use a constant to restricted it 
future, and he(she) may be forget to add the constant.


> Replace calls to Mutation.getFamilyMap, they cause an incompatibility
> -
>
> Key: TRAFODION-1530
> URL: https://issues.apache.org/jira/browse/TRAFODION-1530
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: dtm
>Affects Versions: 1.1 (pre-incubation)
> Environment: Certain HBase versions, for example 
> hbase-0.98.6-cdh5.3.0.
>Reporter: Hans Zeller
>
> Some of the Trafodion code calls the getFamilyMap() method on classes derived 
> from Mutation, such as Put.
> This method is missing in some HBase 0.98.x version. It seems to be there in 
> 0.98.1 and gone in 0.98.6, at least in the CDH versions.
> See HBASE-10339. The method also seems to be gone in HBase 1 and 2, so we can 
> hopefully replace it with the new method getFamilyCellMap().
> This will be required to be able to run Trafodion with Apache HBase.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1530) Replace calls to Mutation.getFamilyMap, they cause an incompatibility

2015-11-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15001465#comment-15001465
 ] 

ASF GitHub Bot commented on TRAFODION-1530:
---

Github user selvaganesang commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/166#discussion_r44612720
  
--- Diff: 
core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/SingleVersionDeleteNotSupported.java
 ---
@@ -53,13 +54,15 @@ public SingleVersionDeleteNotSupported() {
  * mechansim will currently treat DeleteColumn the same as Delete 
which could cause confusion.
  */
 public static void validateDelete(final Delete delete) throws 
SingleVersionDeleteNotSupported {
-Collection> values = delete.getFamilyMap().values();
-for (List value : values) {
-for (KeyValue kv : value) {
-if (Type.Delete.getCode() == kv.getType()) {
+Collection> values = delete.getFamilyCellMap().values();
+for (List value : values) {
+for (Cell cell : value) {
+KeyValue kv = new KeyValue(cell);
--- End diff --

Consider using cell.getTypeByte instead of constructing a new object kv


> Replace calls to Mutation.getFamilyMap, they cause an incompatibility
> -
>
> Key: TRAFODION-1530
> URL: https://issues.apache.org/jira/browse/TRAFODION-1530
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: dtm
>Affects Versions: 1.1 (pre-incubation)
> Environment: Certain HBase versions, for example 
> hbase-0.98.6-cdh5.3.0.
>Reporter: Hans Zeller
>
> Some of the Trafodion code calls the getFamilyMap() method on classes derived 
> from Mutation, such as Put.
> This method is missing in some HBase 0.98.x version. It seems to be there in 
> 0.98.1 and gone in 0.98.6, at least in the CDH versions.
> See HBASE-10339. The method also seems to be gone in HBase 1 and 2, so we can 
> hopefully replace it with the new method getFamilyCellMap().
> This will be required to be able to run Trafodion with Apache HBase.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1530) Replace calls to Mutation.getFamilyMap, they cause an incompatibility

2015-11-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15001460#comment-15001460
 ] 

ASF GitHub Bot commented on TRAFODION-1530:
---

Github user selvaganesang commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/166#discussion_r44612315
  
--- Diff: 
core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionalTable.java
 ---
@@ -765,23 +765,24 @@ else if (result.hasException())
  }
}

-   // validate for well-formedness
-   public void validatePut(final Put put) throws IllegalArgumentException {
-   if (put.isEmpty()) {
-   throw new IllegalArgumentException("No columns to 
insert");
-   }
-   if (maxKeyValueSize > 0) {
-   for (List list : put.getFamilyMap().values()) 
{ 
-   for (KeyValue kv : list) {
-   if (kv.getLength() > maxKeyValueSize) {
-   throw new 
IllegalArgumentException(
-   "KeyValue size 
too large");
-   }
-   }
-   }
-   }
-   }
-   
+// validate for well-formedness
+public void validatePut(final Put put) throws IllegalArgumentException 
{
+if (put.isEmpty()) {
+throw new IllegalArgumentException("No columns to insert");
+}
+if (maxKeyValueSize > 0) {
--- End diff --

Same comment as above


> Replace calls to Mutation.getFamilyMap, they cause an incompatibility
> -
>
> Key: TRAFODION-1530
> URL: https://issues.apache.org/jira/browse/TRAFODION-1530
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: dtm
>Affects Versions: 1.1 (pre-incubation)
> Environment: Certain HBase versions, for example 
> hbase-0.98.6-cdh5.3.0.
>Reporter: Hans Zeller
>
> Some of the Trafodion code calls the getFamilyMap() method on classes derived 
> from Mutation, such as Put.
> This method is missing in some HBase 0.98.x version. It seems to be there in 
> 0.98.1 and gone in 0.98.6, at least in the CDH versions.
> See HBASE-10339. The method also seems to be gone in HBase 1 and 2, so we can 
> hopefully replace it with the new method getFamilyCellMap().
> This will be required to be able to run Trafodion with Apache HBase.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1530) Replace calls to Mutation.getFamilyMap, they cause an incompatibility

2015-11-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15001458#comment-15001458
 ] 

ASF GitHub Bot commented on TRAFODION-1530:
---

Github user selvaganesang commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/166#discussion_r44612244
  
--- Diff: 
core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/SsccTransactionalTable.java
 ---
@@ -692,22 +693,23 @@ public SsccPutMultipleTransactionalResponse 
call(SsccRegionService instance) thr
 
}

-   // validate for well-formedness
-   public void validatePut(final Put put) throws IllegalArgumentException {
-   if (put.isEmpty()) {
-   throw new IllegalArgumentException("No columns to 
insert");
-   }
-   if (maxKeyValueSize > 0) {
-   for (List list : put.getFamilyMap().values()) 
{
-   for (KeyValue kv : list) {
-   if (kv.getLength() > maxKeyValueSize) {
-   throw new 
IllegalArgumentException(
-   "KeyValue size 
too large");
-   }
-   }
-   }
-   }
-   }
+// validate for well-formedness
+public void validatePut(final Put put) throws IllegalArgumentException 
{
+if (put.isEmpty()) {
+throw new IllegalArgumentException("No columns to insert");
+}
+if (maxKeyValueSize > 0) {
--- End diff --

This looks like the code is never executed because maxKeyValueSize is not 
set at all. Should we remove it?  Also, it is not clear why should the keyValue 
size should be restricted in Trafodion. 


> Replace calls to Mutation.getFamilyMap, they cause an incompatibility
> -
>
> Key: TRAFODION-1530
> URL: https://issues.apache.org/jira/browse/TRAFODION-1530
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: dtm
>Affects Versions: 1.1 (pre-incubation)
> Environment: Certain HBase versions, for example 
> hbase-0.98.6-cdh5.3.0.
>Reporter: Hans Zeller
>
> Some of the Trafodion code calls the getFamilyMap() method on classes derived 
> from Mutation, such as Put.
> This method is missing in some HBase 0.98.x version. It seems to be there in 
> 0.98.1 and gone in 0.98.6, at least in the CDH versions.
> See HBASE-10339. The method also seems to be gone in HBase 1 and 2, so we can 
> hopefully replace it with the new method getFamilyCellMap().
> This will be required to be able to run Trafodion with Apache HBase.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1530) Replace calls to Mutation.getFamilyMap, they cause an incompatibility

2015-11-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14997969#comment-14997969
 ] 

ASF GitHub Bot commented on TRAFODION-1530:
---

GitHub user mashengchen opened a pull request:

https://github.com/apache/incubator-trafodion/pull/166

[TRAFODION-1530]deprecated put.getFamilyMap



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mashengchen/incubator-trafodion master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/166.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #166


commit dd2ea96f4743d39d1cab76e3efb8022f25dfac64
Author: aven 
Date:   2015-11-10T04:55:08Z

deprecated put.getFamilyMap




> Replace calls to Mutation.getFamilyMap, they cause an incompatibility
> -
>
> Key: TRAFODION-1530
> URL: https://issues.apache.org/jira/browse/TRAFODION-1530
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: dtm
>Affects Versions: 1.1 (pre-incubation)
> Environment: Certain HBase versions, for example 
> hbase-0.98.6-cdh5.3.0.
>Reporter: Hans Zeller
>
> Some of the Trafodion code calls the getFamilyMap() method on classes derived 
> from Mutation, such as Put.
> This method is missing in some HBase 0.98.x version. It seems to be there in 
> 0.98.1 and gone in 0.98.6, at least in the CDH versions.
> See HBASE-10339. The method also seems to be gone in HBase 1 and 2, so we can 
> hopefully replace it with the new method getFamilyCellMap().
> This will be required to be able to run Trafodion with Apache HBase.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)