You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by potix2 <gi...@git.apache.org> on 2015/02/23 11:29:11 UTC

[GitHub] spark pull request: [Examples] fix deprecated method use in HBaseT...

GitHub user potix2 opened a pull request:

    https://github.com/apache/spark/pull/4725

    [Examples] fix deprecated method use in HBaseTest

    HTableDescriptor(String name) is deprecated.
    
    https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/HTableDescriptor.html
    https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/TableName.html

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

    $ git pull https://github.com/potix2/spark fix-warning-hbase-example

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

    https://github.com/apache/spark/pull/4725.patch

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

    This closes #4725
    
----
commit f613b861afa037f78fc981933789cfc730c9a062
Author: Katsunori Kanda <po...@gmail.com>
Date:   2015-02-23T10:21:16Z

    [Examples] fix deprecated method use in HBaseTest

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [Examples] fix deprecated method use in HBaseT...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4725#discussion_r25157906
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/HBaseTest.scala ---
    @@ -36,7 +36,7 @@ object HBaseTest {
         // Initialize hBase table if necessary
         val admin = new HBaseAdmin(conf)
         if (!admin.isTableAvailable(args(0))) {
    -      val tableDesc = new HTableDescriptor(args(0))
    +      val tableDesc = new HTableDescriptor(TableName.valueOf(args(0)))
    --- End diff --
    
    Do you happen to know how long ago this constructor was added? I want to figure out of this makes it incompatible with any HBase >= 0.98.7, which is presumably the earliest version kind of 'supported' by the examples.
    
    Are there other deprecations in the HBase examples that can be improved? I suspect the examples were written for HBase ~0.94.x


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [Examples] fix deprecated method use in HBaseT...

Posted by potix2 <gi...@git.apache.org>.
Github user potix2 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4725#discussion_r25161690
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/HBaseTest.scala ---
    @@ -36,7 +36,7 @@ object HBaseTest {
         // Initialize hBase table if necessary
         val admin = new HBaseAdmin(conf)
         if (!admin.isTableAvailable(args(0))) {
    -      val tableDesc = new HTableDescriptor(args(0))
    +      val tableDesc = new HTableDescriptor(TableName.valueOf(args(0)))
    --- End diff --
    
    Sorry, I didn't know when that constructor was added. I understand my proposal makes the compatibility of the earliest version broken.
    The other deprication is nothing in the HBase examples, I close this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [Examples] fix deprecated method use in HBaseT...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4725#discussion_r25162029
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/HBaseTest.scala ---
    @@ -36,7 +36,7 @@ object HBaseTest {
         // Initialize hBase table if necessary
         val admin = new HBaseAdmin(conf)
         if (!admin.isTableAvailable(args(0))) {
    -      val tableDesc = new HTableDescriptor(args(0))
    +      val tableDesc = new HTableDescriptor(TableName.valueOf(args(0)))
    --- End diff --
    
    @potix2 no it may be just fine. I was asking you to check it. It would be good to know when the new method was added to make sure this doesn't needlessly break recent versions, but, I agree with this change as long as the constructor was available in >= 0.98.7 and preferably a few previous versions.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [Examples] fix deprecated method use in HBaseT...

Posted by potix2 <gi...@git.apache.org>.
Github user potix2 closed the pull request at:

    https://github.com/apache/spark/pull/4725


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [Examples] fix deprecated method use in HBaseT...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/4725#issuecomment-75521453
  
    Ok to test


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [Examples] fix deprecated method use in HBaseT...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/4725#issuecomment-75519690
  
    Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org