You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Carl Steinbach (JIRA)" <ji...@apache.org> on 2010/01/22 06:02:54 UTC

[jira] Created: (HIVE-1084) Cleanup Class names

Cleanup Class names
-------------------

                 Key: HIVE-1084
                 URL: https://issues.apache.org/jira/browse/HIVE-1084
             Project: Hadoop Hive
          Issue Type: Task
    Affects Versions: 0.6.0
            Reporter: Carl Steinbach
            Assignee: Carl Steinbach


[Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-1084) Cleanup Class names

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-1084:
---------------------------------

    Status: Patch Available  (was: Open)

> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: cleanup-class-names.patch
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-1084) Cleanup Class names

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zheng Shao updated HIVE-1084:
-----------------------------

      Resolution: Fixed
    Release Note: HIVE-1084. Capitalize first letter of class names. (Carl Steinbach via zshao)
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

Committed. Also fixed TestParse test result changes. Thanks Carl!

> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: cleanup-class-names.2.patch, cleanup-class-names.4.patch, cleanup-class-names.patch, svn-move-renamed-files.sh
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-1084) Cleanup Class names

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-1084:
---------------------------------

    Attachment: cleanup-class-names.patch

* Capitalize the class names in o.a.h.h.ql.parse and o.a.h.h.ql.plan
* Reduce checkstyle violations from 4728 to 4687


> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: cleanup-class-names.patch
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-1084) Cleanup Class names

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-1084:
---------------------------------

    Attachment: svn-move-renamed-files.sh
                cleanup-class-names.4.patch

Prepared the patch as follows on an HFS+ case-sensitive volume:
{code}
svn diff --no-diff-deleted --notice-ancestry > cleanup-class-names.p4.patch
{code}

Apply the patch as follows:
{code}
% cd hive-trunk
% source ../svn-move-renamed-files.sh
% patch -p0 -i ../cleanup-class-names.p4.patch
{code}

In case anyone is curious, here is how you create a case-sensitive HFS+ volume:
{code}
% hdiutil create -size 2g -type SPARSE -nospotlight -fs "Case-sensitive Journaled HFS+" -volname hfsplus hfsplus
% hdiutil attach hfsplus.sparseimage
% cd /Volumes/hfsplus
% ...
% hdiutil detach /Volumes/hfsplus
{code}

> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: cleanup-class-names.2.patch, cleanup-class-names.4.patch, cleanup-class-names.patch, svn-move-renamed-files.sh
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-1084) Cleanup Class names

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-1084:
---------------------------------

    Attachment: cleanup-class-names.2.patch

Ensure that all Java class names begin with a capital letter.

* Move ql/plan/[a-z]*Desc.java to ql/plan/desc/[A-Z]*Desc.java
* Move ql/plan/*Work.java to ql/plan/work/*Work.java
* Move all annotations defined in ql to ql/annotations
* Move QB*.java, JoinCond, and JoinType from ql/parse to ql/parse/ast

I think moving these classes to new packages improves the organization of the code,
but it is also a necessity on case-insensitive filesystems like OS X's HFS that
can not handle file renames involving capitalization.

I applied this patch to a clean copy of trunk and noticed the following problems:
* Deleted files show up as modified files with size 0.
* The ql/plan/desc, ql/plan/work, ql/parse/ast, and ql/annotations directories and contents are not recognized by SVN. You have to 'svn add' each directory.

The following script remedies these problems (run from trunk root):
{code}
#/bin/sh

for file in `find ql -name *.java -size 0`
do
    svn revert $file
    svn rm $file
done

svn add ql/src/java/org/apache/hadoop/hive/ql/plan/desc
svn add ql/src/java/org/apache/hadoop/hive/ql/plan/work
svn add ql/src/java/org/apache/hadoop/hive/ql/parse/ast
svn add ql/src/java/org/apache/hadoop/hive/ql/annotations
{code}



> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: cleanup-class-names.2.patch, cleanup-class-names.patch
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-1084) Cleanup Class names

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zheng Shao updated HIVE-1084:
-----------------------------

    Fix Version/s: 0.6.0

> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>             Fix For: 0.6.0
>
>         Attachments: cleanup-class-names.2.patch, cleanup-class-names.4.patch, cleanup-class-names.patch, svn-move-renamed-files.sh
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1084) Cleanup Class names

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804363#action_12804363 ] 

Carl Steinbach commented on HIVE-1084:
--------------------------------------

I am working on a Mac with a case-insensitive file system, and as a result
I can't use 'svn rename' when the difference between old and new names
is just capitalization.

'svn rename a b' reduces to 'svn copy a b; svn delete a'. This fails on case-insensitive
file systems since svn thinks you are trying to copy the file to itself.

I have tried doing 'svn rename selectDesc.java S1electDesc.java', followed by
'svn rename S1electDesc.java SelectDesc.java', but this seems to corrupt my
svn index.

I have two suggestions for how to proceed:
# Apply the patch as-is and lose the revision history of the deleted files. I don't think this is a big deal since the deleted files are mostly bean, annotations, etc and don't contain much real code.
# Pass this ticket and patch on to a committer with access to a case-sensitive file system for more work.



> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: cleanup-class-names.2.patch, cleanup-class-names.patch
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1084) Cleanup Class names

Posted by "Prasad Chakka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804356#action_12804356 ] 

Prasad Chakka commented on HIVE-1084:
-------------------------------------

please use 'svn rename' to change file names instead of doing 'svn delete' and 'svn add'. the former will preserve the history where as later do not preserver the history of the file. 

> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: cleanup-class-names.2.patch, cleanup-class-names.patch
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1084) Cleanup Class names

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804374#action_12804374 ] 

Carl Steinbach commented on HIVE-1084:
--------------------------------------

Please ignore my last comment. I created a case-sensitive HFS+ partition and am redoing the patch.

> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: cleanup-class-names.2.patch, cleanup-class-names.patch
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1084) Cleanup Class names

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804388#action_12804388 ] 

Zheng Shao commented on HIVE-1084:
----------------------------------

Looks good to me. The script and patch applied cleanly.
Running tests now. Will commit after tests pass.

> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: cleanup-class-names.2.patch, cleanup-class-names.4.patch, cleanup-class-names.patch, svn-move-renamed-files.sh
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1084) Cleanup Class names

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803654#action_12803654 ] 

Zheng Shao commented on HIVE-1084:
----------------------------------

There is a problem applying this patch: cannot find ql/src/java/org/apache/hadoop/hive/ql/plan/JoinCondDesc.java to patch.
Can you take a look?


> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hadoop Hive
>          Issue Type: Task
>    Affects Versions: 0.6.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>         Attachments: cleanup-class-names.patch
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-1084) Cleanup Class names

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-1084:
---------------------------------

    Affects Version/s:     (was: 0.6.0)
         Release Note:   (was: HIVE-1084. Capitalize first letter of class names. (Carl Steinbach via zshao))

> Cleanup Class names
> -------------------
>
>                 Key: HIVE-1084
>                 URL: https://issues.apache.org/jira/browse/HIVE-1084
>             Project: Hive
>          Issue Type: Task
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>             Fix For: 0.6.0
>
>         Attachments: cleanup-class-names.2.patch, cleanup-class-names.4.patch, cleanup-class-names.patch, svn-move-renamed-files.sh
>
>
> [Sun's Code Conventions for the Java Programming Language|http://java.sun.com/docs/codeconv/] document stipulates that Java class names must begin with a capital letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.