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

Kengo Seki updated HADOOP-12255:
--------------------------------
    Attachment: HADOOP-12255.HADOOP-12111.01.patch

-01:

* Ruby and rubocop added to the Dockerfile

I copied start-build-env.sh and dev-support to the root of HBase and ran 
start-build-env.sh.
I confirmed that ruby and rubocop ware successfully installed, and the rubocop 
plugin worked expectedly.

{code}
(in the docker container)

sekikn@2459435d5610:~/hadoop$ cat /tmp/test.patch 
diff --git a/hbase-shell/src/main/ruby/hbase.rb 
b/hbase-shell/src/main/ruby/hbase.rb
index aca1006..a4303dc 100644
--- a/hbase-shell/src/main/ruby/hbase.rb
+++ b/hbase-shell/src/main/ruby/hbase.rb
@@ -53,7 +53,7 @@ module HBaseConstants
   METRICS = "METRICS"
   REVERSED = "REVERSED"
   REPLICATION_SCOPE = "REPLICATION_SCOPE"
-  INTERVAL = 'INTERVAL'
+  INTERVAL = "INTERVAL"
   CACHE = 'CACHE'
   FILTER = 'FILTER'
   SPLITS = 'SPLITS'
@@ -78,7 +78,7 @@ module HBaseConstants
   CLUSTER_KEY = 'CLUSTER_KEY'
   TABLE_CFS = 'TABLE_CFS'
   CONFIG = 'CONFIG'
-  DATA = 'DATA'
+  DATA = "DATA"
 
   # Load constants from hbase java API
   def self.promote_constants(constants)
sekikn@2459435d5610:~/hadoop$ export JAVA_HOME=/usr/lib/jvm/java-7-oracle 
sekikn@2459435d5610:~/hadoop$ dev-support/test-patch.sh --dirty-workspace 
--project=hbase /tmp/test.patch

(snip)

| Vote |       Subsystem |  Runtime   | Comment
============================================================================
|  -1  |     mvninstall  |  0m 55s    | root in master failed. 
|  -1  |          javac  |  0m 13s    | root in master failed. 
|  -1  |        javadoc  |  0m 22s    | hbase-shell in master failed. 
|  +1  |        @author  |  0m 0s     | The patch does not contain any @author 
|      |                 |            | tags.
|  -1  |     test4tests  |  0m 0s     | 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.
|  -1  |          javac  |  2m 13s    | root in the patch failed. 
|  -1  |     asflicense  |  0m 43s    | root in the patch failed. 
|  -1  |        rubocop  |  0m 2s     | The applied patch generated 2 new 
|      |                 |            | rubocop issues (total was 34, now 36).
|  -1  |     whitespace  |  0m 0s     | The patch has 9 line(s) that end in 
|      |                 |            | whitespace. Use git apply
|      |                 |            | --whitespace=fix.
|  +1  |    hadoopcheck  |  0m 45s    | Patch does not cause any errors with 
|      |                 |            | Hadoop 2.4.1 2.5.2 2.6.0.
|  +1  |     mvninstall  |  0m 0s     | the patch passed 
|  -1  |        javadoc  |  0m 14s    | hbase-shell in the patch failed. 
|  -1  |        eclipse  |  0m 13s    | hbase-shell in the patch failed. 
|      |                 |  6m 15s    | 


|| Subsystem || Report/Notes ||
============================================================================
| git revision | master / 5f1129c |
| Optional Tests | asflicense javac javadoc mvninstall unit rubocop |
| uname | Linux 2459435d5610 4.0.3-boot2docker #1 SMP Wed May 13 20:54:49 UTC 
2015 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /home/sekikn/hadoop/dev-support/personality/hbase.sh |
| Default Java | 1.7.0_80 |
| mvninstall | /tmp/test-patch-hbase/198/branch-mvninstall-root.txt |
| javac | /tmp/test-patch-hbase/198/branch-javac-root.txt |
| javadoc | /tmp/test-patch-hbase/198/branch-javadoc-hbase-shell.txt |
| javac | /tmp/test-patch-hbase/198/patch-javac-root.txt |
| asflicense | /tmp/test-patch-hbase/198/patch-asflicense-root.txt |
| rubocop | v0.32.1 |
| rubocop | /tmp/test-patch-hbase/198/diff-patch-rubocop.txt |
| whitespace | /tmp/test-patch-hbase/198/whitespace-eol.txt |
| javadoc | /tmp/test-patch-hbase/198/patch-javadoc-hbase-shell.txt |
| eclipse | /tmp/test-patch-hbase/198/patch-eclipse-hbase-shell.txt |


============================================================================
============================================================================
                              Finished build.
============================================================================
============================================================================


sekikn@2459435d5610:~/hadoop$ cat 
/tmp/test-patch-hbase/198/diff-patch-rubocop.txt
hbase-shell/src/main/ruby/hbase.rb:56:14: C: Prefer single-quoted strings when 
you don't need string interpolation or special symbols.
  INTERVAL = "INTERVAL"
             ^^^^^^^^^^
hbase-shell/src/main/ruby/hbase.rb:81:10: C: Prefer single-quoted strings when 
you don't need string interpolation or special symbols.
  DATA = "DATA"
         ^^^^^^
sekikn@2459435d5610:~/hadoop$ 
{code}

> Add support for rubocop
> -----------------------
>
>                 Key: HADOOP-12255
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12255
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: yetus
>    Affects Versions: HADOOP-12111
>            Reporter: Allen Wittenauer
>            Assignee: Kengo Seki
>         Attachments: HADOOP-12255.HADOOP-12111.00.patch, 
> HADOOP-12255.HADOOP-12111.01.patch
>
>
> We should support rubocop.



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

Reply via email to