[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-05-01 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai updated HBASE-20327:
---
  Resolution: Fixed
Hadoop Flags: Reviewed
  Status: Resolved  (was: Patch Available)

Push to branch-2.0. Resolve this issue now.

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Fix For: 3.0.0, 2.1.0, 2.0.1
>
> Attachments: HBASE-20327.master.001.patch, 
> HBASE-20327.master.002.patch, HBASE-20327.master.003.patch, 
> HBASE-20327.master.004.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-24 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai updated HBASE-20327:
---
Fix Version/s: 2.0.1
   2.1.0

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Fix For: 3.0.0, 2.1.0, 2.0.1
>
> Attachments: HBASE-20327.master.001.patch, 
> HBASE-20327.master.002.patch, HBASE-20327.master.003.patch, 
> HBASE-20327.master.004.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1 

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-18 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Attachment: HBASE-20327.master.004.patch

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HBASE-20327.master.001.patch, 
> HBASE-20327.master.002.patch, HBASE-20327.master.003.patch, 
> HBASE-20327.master.004.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, 

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-12 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Attachment: HBASE-20327.master.003.patch

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HBASE-20327.master.001.patch, 
> HBASE-20327.master.002.patch, HBASE-20327.master.003.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> 

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-12 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Attachment: (was: HBASE-20327.master.003.patch)

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HBASE-20327.master.001.patch, 
> HBASE-20327.master.002.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value   

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-12 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Attachment: HBASE-20327.master.003.patch

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HBASE-20327.master.001.patch, 
> HBASE-20327.master.002.patch, HBASE-20327.master.003.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> 

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-12 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Attachment: HBASE-20327.master.002.patch

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HBASE-20327.master.001.patch, 
> HBASE-20327.master.002.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-10 Thread Sean Busbey (JIRA)

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

Sean Busbey updated HBASE-20327:

Issue Type: Improvement  (was: Bug)

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HBASE-20327.master.001.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-10 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Release Note: This change will enable users to perform append and increment 
operation with null qualifier via hbase-shell.

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Bug
>  Components: shell
>Affects Versions: 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HBASE-20327.master.001.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-03 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Fix Version/s: 3.0.0
Affects Version/s: (was: 1.0.0)
   Status: Patch Available  (was: Open)

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Bug
>  Components: shell
>Affects Versions: 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HBASE-20327.master.001.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> 

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-03 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Attachment: HBASE-20327.master.001.patch

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Bug
>  Components: shell
>Affects Versions: 1.0.0, 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
> Attachments: HBASE-20327.master.001.patch
>
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0062 seconds

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-02 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Affects Version/s: (was: 1.3.1)
   1.0.0

> When qualifier is not specified, append and incr operation do not work (shell)
> --
>
> Key: HBASE-20327
> URL: https://issues.apache.org/jira/browse/HBASE-20327
> Project: HBase
>  Issue Type: Bug
>  Components: shell
>Affects Versions: 1.0.0, 3.0.0, 2.0.0
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Minor
>
> Running the example commands specified in shell docs for "append" and "incr" 
> throw following error:
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> append{code}
> {code:java}
> ERROR: Failed to provide both column family and column qualifier for 
> incr{code}
> While running the same command via java does not require the user to provide 
> both column and qualifier and works smoothly.
>  
> Steps to reproduce:
> 1) APPEND
> {code:java}
> hbase(main):002:0> create 't1', 'c1', 'c2'
> Created table t1
> Took 0.8151 seconds   
>      
> hbase(main):003:0> append 't1', 'r1', 'c1', 'value'
> ERROR: Failed to provide both column family and column qualifier for append
> Appends a cell 'value' at specified table/row/column coordinates.
>   hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
>   hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0326 seconds  
> hbase(main):004:0> scan 't1'
> ROW  COLUMN+CELL  
>      
> 0 row(s)
> Took 0.1273 seconds   
>   {code}
> While the same command would run if we run the following java code:
> {code:java}
>     try (Connection connection = ConnectionFactory.createConnection(config);
>     Admin admin = connection.getAdmin();) {
>   Table table = connection.getTable(TableName.valueOf("t1"));
>   Append a = new Append(Bytes.toBytes("r1"));
>   a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
>   table.append(a);
>     }{code}
> Scan result after executing java code:
> {code:java}
> hbase(main):005:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0188 seconds
> {code}
>  
> 2) INCREMENT:
> Similarly in case of increment, we get the following error (shell):
> {code:java}
> hbase(main):006:0> incr 't1', 'r2', 'c1', 111
> ERROR: Failed to provide both column family and column qualifier for incr
> Increments a cell 'value' at specified table/row/column coordinates.
> To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
> 'c1' by 1 (can be omitted) or 10 do:
>   hbase> incr 'ns1:t1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1'
>   hbase> incr 't1', 'r1', 'c1', 1
>   hbase> incr 't1', 'r1', 'c1', 10
>   hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> The same commands also can be run on a table reference. Suppose you had a 
> reference
> t to table 't1', the corresponding command would be:
>   hbase> t.incr 'r1', 'c1'
>   hbase> t.incr 'r1', 'c1', 1
>   hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
>   hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}
> Took 0.0103 seconds   
>      
> hbase(main):007:0> scan 't1'
> ROW  COLUMN+CELL  
>      
>  r1  column=c1:, timestamp=1522649623090, 
> value=value  
> 1 row(s)
> Took 0.0062 seconds  
> {code}
> While the same 

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-02 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Description: 
Running the example commands specified in shell docs for "append" and "incr" 
throw following error:
{code:java}
ERROR: Failed to provide both column family and column qualifier for 
append{code}
{code:java}
ERROR: Failed to provide both column family and column qualifier for incr{code}
While running the same command via java does not require the user to provide 
both column and qualifier and works smoothly.

 

Steps to reproduce:

1) APPEND
{code:java}
hbase(main):002:0> create 't1', 'c1', 'c2'
Created table t1
Took 0.8151 seconds 
   
hbase(main):003:0> append 't1', 'r1', 'c1', 'value'

ERROR: Failed to provide both column family and column qualifier for append

Appends a cell 'value' at specified table/row/column coordinates.

  hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
  hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}

The same commands also can be run on a table reference. Suppose you had a 
reference
t to table 't1', the corresponding command would be:

  hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
  hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}

Took 0.0326 seconds  

hbase(main):004:0> scan 't1'
ROW  COLUMN+CELL
   
0 row(s)
Took 0.1273 seconds 
    {code}
While the same command would run if we run the following java code:
{code:java}
    try (Connection connection = ConnectionFactory.createConnection(config);
    Admin admin = connection.getAdmin();) {
  Table table = connection.getTable(TableName.valueOf("t1"));
  Append a = new Append(Bytes.toBytes("r1"));
  a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
  table.append(a);
    }{code}
Scan result after executing java code:
{code:java}
hbase(main):005:0> scan 't1'
ROW  COLUMN+CELL
   
 r1  column=c1:, timestamp=1522649623090, 
value=value  
1 row(s)
Took 0.0188 seconds
{code}
 

2) INCREMENT:

Similarly in case of increment, we get the following error (shell):
{code:java}
hbase(main):006:0> incr 't1', 'r2', 'c1', 111

ERROR: Failed to provide both column family and column qualifier for incr

Increments a cell 'value' at specified table/row/column coordinates.
To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
'c1' by 1 (can be omitted) or 10 do:

  hbase> incr 'ns1:t1', 'r1', 'c1'
  hbase> incr 't1', 'r1', 'c1'
  hbase> incr 't1', 'r1', 'c1', 1
  hbase> incr 't1', 'r1', 'c1', 10
  hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
  hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
  hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}

The same commands also can be run on a table reference. Suppose you had a 
reference
t to table 't1', the corresponding command would be:

  hbase> t.incr 'r1', 'c1'
  hbase> t.incr 'r1', 'c1', 1
  hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
  hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}

Took 0.0103 seconds 
   
hbase(main):007:0> scan 't1'
ROW  COLUMN+CELL
   
 r1  column=c1:, timestamp=1522649623090, 
value=value  
1 row(s)
Took 0.0062 seconds  
{code}
While the same command would run, if we run the following java code:
{code:java}
    try (Connection connection = ConnectionFactory.createConnection(config);
    Admin admin = connection.getAdmin();) {
  Table table = connection.getTable(TableName.valueOf("t1"));
  Increment incr = new Increment(Bytes.toBytes("r2"));
  incr.addColumn(Bytes.toBytes("c1"), null, 111);
  table.increment(incr);
  scan(table);
    }
{code}
Scan result after executing java code:
{code:java}
hbase(main):008:0> scan 't1'
ROW  COLUMN+CELL
   
 r1  column=c1:, 

[jira] [Updated] (HBASE-20327) When qualifier is not specified, append and incr operation do not work (shell)

2018-04-02 Thread Nihal Jain (JIRA)

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

Nihal Jain updated HBASE-20327:
---
Description: 
Running the example commands specified in shell docs for "append" and "incr" 
throw following error:
{code:java}
ERROR: Failed to provide both column family and column qualifier for 
append{code}
{code:java}
ERROR: Failed to provide both column family and column qualifier for incr{code}
While running the same command via java does not require the user to provide 
both column and qualifier and works smoothly.

 

Steps to reproduce:

1) APPEND
{code:java}
hbase(main):002:0> create 't1', 'c1', 'c2'
Created table t1
Took 0.8151 seconds 
   
hbase(main):003:0> append 't1', 'r1', 'c1', 'value'

ERROR: Failed to provide both column family and column qualifier for append

Appends a cell 'value' at specified table/row/column coordinates.

  hbase> append 't1', 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
  hbase> append 't1', 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}

The same commands also can be run on a table reference. Suppose you had a 
reference
t to table 't1', the corresponding command would be:

  hbase> t.append 'r1', 'c1', 'value', ATTRIBUTES=>{'mykey'=>'myvalue'}
  hbase> t.append 'r1', 'c1', 'value', {VISIBILITY=>'PRIVATE|SECRET'}

Took 0.0326 seconds 
 {code}
While the same command would run if we run the following java code:
{code:java}
    try (Connection connection = ConnectionFactory.createConnection(config);
    Admin admin = connection.getAdmin();) {
  Table table = connection.getTable(TableName.valueOf("t1"));
  Append a = new Append(Bytes.toBytes("r1"));
  a.addColumn(Bytes.toBytes("c1"), null, Bytes.toBytes("value"));
  table.append(a);
    }{code}
Scan result after executing java code:
{code:java}
hbase(main):005:0> scan 't1'
ROW  COLUMN+CELL
   
 r1  column=c1:, timestamp=1522649623090, 
value=value  
1 row(s)
Took 0.0188 seconds
{code}
 

2) INCREMENT:

Similarly in case of increment, we get the following error (shell):
{code:java}
hbase(main):006:0> incr 't1', 'r2', 'c1', 111

ERROR: Failed to provide both column family and column qualifier for incr

Increments a cell 'value' at specified table/row/column coordinates.
To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column
'c1' by 1 (can be omitted) or 10 do:

  hbase> incr 'ns1:t1', 'r1', 'c1'
  hbase> incr 't1', 'r1', 'c1'
  hbase> incr 't1', 'r1', 'c1', 1
  hbase> incr 't1', 'r1', 'c1', 10
  hbase> incr 't1', 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
  hbase> incr 't1', 'r1', 'c1', {ATTRIBUTES=>{'mykey'=>'myvalue'}}
  hbase> incr 't1', 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}

The same commands also can be run on a table reference. Suppose you had a 
reference
t to table 't1', the corresponding command would be:

  hbase> t.incr 'r1', 'c1'
  hbase> t.incr 'r1', 'c1', 1
  hbase> t.incr 'r1', 'c1', 10, {ATTRIBUTES=>{'mykey'=>'myvalue'}}
  hbase> t.incr 'r1', 'c1', 10, {VISIBILITY=>'PRIVATE|SECRET'}

Took 0.0103 seconds 
   
hbase(main):007:0> scan 't1'
ROW  COLUMN+CELL
   
 r1  column=c1:, timestamp=1522649623090, 
value=value  
1 row(s)
Took 0.0062 seconds  
{code}
While the same command would run, if we run the following java code:
{code:java}
    try (Connection connection = ConnectionFactory.createConnection(config);
    Admin admin = connection.getAdmin();) {
  Table table = connection.getTable(TableName.valueOf("t1"));
  Increment incr = new Increment(Bytes.toBytes("r2"));
  incr.addColumn(Bytes.toBytes("c1"), null, 111);
  table.increment(incr);
  scan(table);
    }
{code}
Scan result after executing java code:
{code:java}
hbase(main):008:0> scan 't1'
ROW  COLUMN+CELL
   
 r1  column=c1:, timestamp=1522649623090, 
value=value  
 r2  column=c1:, timestamp=1522649933949, 
value=\x00\x00\x00\x00\x00\x00\x00o