[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-24 Thread Hudson (JIRA)

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

Hudson commented on HBASE-18001:


FAILURE: Integrated in Jenkins build HBase-Trunk_matrix #3068 (See 
[https://builds.apache.org/job/HBase-Trunk_matrix/3068/])
HBASE-18001 Extend the "count" shell command to support specified (chia7712: 
rev 64c701768bb451f37f65bbf3c3126d71a6cd2133)
* (edit) hbase-shell/src/main/ruby/hbase/table.rb
* (edit) hbase-shell/src/test/ruby/hbase/table_test.rb
* (edit) hbase-shell/src/main/ruby/shell/commands/count.rb


> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch, HBASE-18001-v2.patch, 
> HBASE-18001-v3.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-24 Thread Guangxu Cheng (JIRA)

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

Guangxu Cheng commented on HBASE-18001:
---

Thanks [~chia7712] and [~jmspaggi] for review.:)

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch, HBASE-18001-v2.patch, 
> HBASE-18001-v3.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-24 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-18001:


+1.
I will commit it later.

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch, HBASE-18001-v2.patch, 
> HBASE-18001-v3.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-17 Thread Guangxu Cheng (JIRA)

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

Guangxu Cheng commented on HBASE-18001:
---

UT looks good. [~chia7712] [~jmspaggi] Any other concerns? Thanks.

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch, HBASE-18001-v2.patch, 
> HBASE-18001-v3.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-17 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HBASE-18001:
---

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 14s 
{color} | {color:blue} Docker mode activated. {color} |
| {color:blue}0{color} | {color:blue} rubocop {color} | {color:blue} 0m 0s 
{color} | {color:blue} rubocop was not available. {color} |
| {color:blue}0{color} | {color:blue} ruby-lint {color} | {color:blue} 0m 0s 
{color} | {color:blue} Ruby-lint was not available. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s 
{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 
0s {color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 3m 
18s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
16s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 7s 
{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 
15s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
16s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 
0s {color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
30m 16s {color} | {color:green} Patch does not cause any errors with Hadoop 
2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3 or 3.0.0-alpha2. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 8s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 5m 11s 
{color} | {color:green} hbase-shell in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 
7s {color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 40m 20s {color} 
| {color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=1.12.3 Server=1.12.3 Image:yetus/hbase:757bf37 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12868543/HBASE-18001-v3.patch |
| JIRA Issue | HBASE-18001 |
| Optional Tests |  asflicense  javac  javadoc  unit  rubocop  ruby_lint  |
| uname | Linux a3ad9ca0b078 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 
13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build@2/component/dev-support/hbase-personality.sh
 |
| git revision | master / 62d7323 |
| Default Java | 1.8.0_131 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HBASE-Build/6825/testReport/ |
| modules | C: hbase-shell U: hbase-shell |
| Console output | 
https://builds.apache.org/job/PreCommit-HBASE-Build/6825/console |
| Powered by | Apache Yetus 0.3.0   http://yetus.apache.org |


This message was automatically generated.



> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch, HBASE-18001-v2.patch, 
> HBASE-18001-v3.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-17 Thread Guangxu Cheng (JIRA)

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

Guangxu Cheng commented on HBASE-18001:
---

v3: Add a unit test.

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch, HBASE-18001-v2.patch, 
> HBASE-18001-v3.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-16 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-18001:


LGTM
Do we have any UT against the count executed by Shell?

[~jmspaggi] Any comments?

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch, HBASE-18001-v2.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-15 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HBASE-18001:
---

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 13m 37s 
{color} | {color:blue} Docker mode activated. {color} |
| {color:blue}0{color} | {color:blue} rubocop {color} | {color:blue} 0m 1s 
{color} | {color:blue} rubocop was not available. {color} |
| {color:blue}0{color} | {color:blue} ruby-lint {color} | {color:blue} 0m 1s 
{color} | {color:blue} Ruby-lint was not available. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s 
{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:red}-1{color} | {color:red} test4tests {color} | {color:red} 0m 0s 
{color} | {color:red} The patch doesn't appear to include any new or modified 
tests. Please justify why no new tests are needed for this patch. Also please 
list what manual steps were performed to verify this patch. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 3m 
23s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
15s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 8s 
{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 
14s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
16s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 
0s {color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
28m 36s {color} | {color:green} Patch does not cause any errors with Hadoop 
2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3 or 3.0.0-alpha2. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 8s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 4m 49s 
{color} | {color:green} hbase-shell in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 
6s {color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 51m 46s {color} 
| {color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=1.12.3 Server=1.12.3 Image:yetus/hbase:757bf37 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12868108/HBASE-18001-v2.patch |
| JIRA Issue | HBASE-18001 |
| Optional Tests |  asflicense  javac  javadoc  unit  rubocop  ruby_lint  |
| uname | Linux b3e5a707967c 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 
15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh
 |
| git revision | master / 341223d |
| Default Java | 1.8.0_131 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HBASE-Build/6791/testReport/ |
| modules | C: hbase-shell U: hbase-shell |
| Console output | 
https://builds.apache.org/job/PreCommit-HBASE-Build/6791/console |
| Powered by | Apache Yetus 0.3.0   http://yetus.apache.org |


This message was automatically generated.



> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch, HBASE-18001-v2.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-15 Thread Guangxu Cheng (JIRA)

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

Guangxu Cheng commented on HBASE-18001:
---

v2 takes the suggestion from [~chia7712] Thanks

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch, HBASE-18001-v2.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-15 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-18001:


On the other hand, would you please trigger the QA? (I mean that you should 
click the "Submit Patch")

Thanks.

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-15 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-18001:


{code}
+else
+  scan.setFilter(org.apache.hadoop.hbase.filter.FilterList.new(
+  
org.apache.hadoop.hbase.filter.FilterList::Operator.valueOf('MUST_PASS_ALL'),
+  filter,
+  org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter.new))
+end
{code}
We need to ensure that all filters have the same value of parameter "reversed". 
Otherwise, we may fail to build the new FilterList. (Although it doesn't make 
sense to specify the parameter "reversed" for counting.)

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-15 Thread Guangxu Cheng (JIRA)

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

Guangxu Cheng commented on HBASE-18001:
---

bq.Are users still able to pass on the size of cache to scan?

{code}
params = {
  'INTERVAL' => 1000,
  'CACHE' => 10
}.merge(params)

scan = table._hash_to_scan(params)
{code}
{code}
-count = table._count_internal(params['INTERVAL'].to_i, 
params['CACHE'].to_i) do |cnt, row|
+count = table._count_internal(params['INTERVAL'].to_i, scan) do |cnt, 
row|
{code}
sure, parameter CACHE will be set to the scan by _hash_to_scan(params) in 
couter.rb

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-15 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-18001:


{code}
-def _count_internal(interval = 1000, caching_rows = 10)
+def _count_internal(interval = 1000, scan = nil)
{code}
Are users still able to pass on the size of cache to scan? 

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-15 Thread Guangxu Cheng (JIRA)

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

Guangxu Cheng commented on HBASE-18001:
---

I'm so sorry to submit the patch for so long.
[~jmspaggi] [~chia7712] mind taking a look at it ? thanks

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
> Attachments: HBASE-18001-v1.patch
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-08 Thread Guangxu Cheng (JIRA)

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

Guangxu Cheng commented on HBASE-18001:
---

{quote}
We can go with STARTROW, STOPROW, FILTER and COLUMNS...
Guangxu Cheng is this something you are going to work on?
{quote}
yep, I'm working on this. Thanks for your suggestion. patch will be coming 
soon.Thanks

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-08 Thread Jean-Marc Spaggiari (JIRA)

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

Jean-Marc Spaggiari commented on HBASE-18001:
-

We can go with STARTROW, STOPROW, FILTER and COLUMNS...

[~andrewcheng] is this something you are going to work on?

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-07 Thread Chia-Ping Tsai (JIRA)

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

Chia-Ping Tsai commented on HBASE-18001:


bq. Can we add three parameters STARTROW, STOPROW and FILTER?
It is better to include the parameters COLUMNS.

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-07 Thread Guangxu Cheng (JIRA)

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

Guangxu Cheng commented on HBASE-18001:
---

[~jmspaggi] Thanks for the reviews.
I think it is a very important option to specify the "startrow" and "stoprow".
Can we add three parameters STARTROW, STOPROW and FILTER?

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HBASE-18001) Extend the "count" shell command to support specified conditions

2017-05-05 Thread Jean-Marc Spaggiari (JIRA)

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

Jean-Marc Spaggiari commented on HBASE-18001:
-

Hi Guangxu, 

Today, thjere is no way to do that, but, indeed, might be interesting to add a 
"filter" parameter to the command. Is it something you are going to work on?

JMS

> Extend the "count" shell command to support specified conditions
> 
>
> Key: HBASE-18001
> URL: https://issues.apache.org/jira/browse/HBASE-18001
> Project: HBase
>  Issue Type: Improvement
>  Components: shell
>Affects Versions: 2.0.0
>Reporter: Guangxu Cheng
>Assignee: Guangxu Cheng
>Priority: Minor
>  Labels: beginner
> Fix For: 2.0.0
>
>
> shell command "count" can only count the number of rows in a table.
> And, it could not count the number of the specified conditions.
> Can we allow users to specified conditions like command "scan"?
> In that case, we can count the number of rows under any conditions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)