[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-17 Thread Enis Soztutar (JIRA)

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

Enis Soztutar updated HBASE-14203:
--
Assignee: Heng Chen

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Assignee: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch, HBASE-14203_v2.patch, 
 HBASE-14203_v3.patch, HBASE-14203_v4.patch, HBASE-14203_v5.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-17 Thread Enis Soztutar (JIRA)

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

Enis Soztutar updated HBASE-14203:
--
   Resolution: Fixed
 Hadoop Flags: Reviewed
Fix Version/s: 1.3.0
   1.2.0
   2.0.0
   Status: Resolved  (was: Patch Available)

I've committed this to 1.2+. Thanks Heng for the patch. 

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Assignee: Heng Chen
Priority: Trivial
 Fix For: 2.0.0, 1.2.0, 1.3.0

 Attachments: HBASE-14203.patch, HBASE-14203_v2.patch, 
 HBASE-14203_v3.patch, HBASE-14203_v4.patch, HBASE-14203_v5.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-14 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: HBASE-14203_v5.patch

Thank [~enis] for your reply!

I update the patch as your suggestions

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch, HBASE-14203_v2.patch, 
 HBASE-14203_v3.patch, HBASE-14203_v4.patch, HBASE-14203_v5.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-12 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: HBASE-14203_v4.patch

retry

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch, HBASE-14203_v2.patch, 
 HBASE-14203_v3.patch, HBASE-14203_v4.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-12 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: (was: HBASE-14203_v4.patch)

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch, HBASE-14203_v2.patch, 
 HBASE-14203_v3.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-12 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: HBASE-14203_v4.patch

testcase success in my local environment.
retry!

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch, HBASE-14203_v2.patch, 
 HBASE-14203_v3.patch, HBASE-14203_v4.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-12 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: (was: HBASE-14203_v4.patch)

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch, HBASE-14203_v2.patch, 
 HBASE-14203_v3.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-12 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: HBASE-14203_v4.patch

{code}
I would pursue the static methods approach if you ask me.
{code}

Thanks for your reply!

You are right, i extract the method to be static. 

update the patch

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch, HBASE-14203_v2.patch, 
 HBASE-14203_v3.patch, HBASE-14203_v4.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-11 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: (was: HBASE-14203.patch)

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-11 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: HBASE-14203.patch

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-11 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: HBASE-14203_v2.patch

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch, HBASE-14203_v2.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-11 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: HBASE-14203_v3.patch

{quote}
Don't synchronize on a non-final field. Additionally I'm pretty sure that most 
of the tests are failing as they assume that getAdmin will create a new 
HBaseAdmin.
{quote}

Thanks for your replay!

Testcase failed is due to NPE when {{synchronized(admin)}},  I use another 
final field {{adminLock}} to sync as you said. 

The patch is updated!

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch, HBASE-14203_v2.patch, 
 HBASE-14203_v3.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-10 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Attachment: HBASE-14203.patch

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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


[jira] [Updated] (HBASE-14203) remove duplicate code getTableDescriptor in HTable

2015-08-10 Thread Heng Chen (JIRA)

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

Heng Chen updated HBASE-14203:
--
Status: Patch Available  (was: Open)

 remove duplicate code getTableDescriptor in HTable
 --

 Key: HBASE-14203
 URL: https://issues.apache.org/jira/browse/HBASE-14203
 Project: HBase
  Issue Type: Improvement
Reporter: Heng Chen
Priority: Trivial
 Attachments: HBASE-14203.patch


 As TODO in comment said, 
 {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. 
 remove the duplicate code.



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