Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      System.exit exists in various places in code. Its good to get rid of it.

      1. no_sysexit.patch
        1 kB
        Ashutosh Chauhan
      2. hive_2134.patch
        3 kB
        Ashutosh Chauhan
      3. hive_2134_1.patch
        3 kB
        Ashutosh Chauhan

        Activity

        Hide
        Amareshwari Sriramadasu added a comment -

        I just committed this.
        Thanks Ashutosh!

        Show
        Amareshwari Sriramadasu added a comment - I just committed this. Thanks Ashutosh!
        Hide
        Ashutosh Chauhan added a comment -

        Sorry about that. Uploaded new patch with no compilation errors.

        Show
        Ashutosh Chauhan added a comment - Sorry about that. Uploaded new patch with no compilation errors.
        Hide
        Amareshwari Sriramadasu added a comment -

        Ashutosh, ant package builds properly. But ant test fails with compilation error.

        Show
        Amareshwari Sriramadasu added a comment - Ashutosh, ant package builds properly. But ant test fails with compilation error.
        Hide
        Ashutosh Chauhan added a comment -

        $ svn co http://svn.apache.org/repos/asf/hive/trunk .
        $ curl https://issues.apache.org/jira/secure/attachment/12477856/hive_2134.patch | patch -p0
        $ ant package
        BUILD SUCCESSFUL
        Total time: 2 minutes 35 seconds

        works for me. can you double check if you have clean upto date tree.

        Show
        Ashutosh Chauhan added a comment - $ svn co http://svn.apache.org/repos/asf/hive/trunk . $ curl https://issues.apache.org/jira/secure/attachment/12477856/hive_2134.patch | patch -p0 $ ant package BUILD SUCCESSFUL Total time: 2 minutes 35 seconds works for me. can you double check if you have clean upto date tree.
        Hide
        Amareshwari Sriramadasu added a comment -

        Seems patch has gone stale. I'm compilation error with the patch:
        TestMetaStoreEventListener.java:56: unreported exception java.lang.Throwable;
        must be caught or declared to be thrown
        [javac] HiveMetaStore.main(new String[]

        {msPort}

        );

        Show
        Amareshwari Sriramadasu added a comment - Seems patch has gone stale. I'm compilation error with the patch: TestMetaStoreEventListener.java:56: unreported exception java.lang.Throwable; must be caught or declared to be thrown [javac] HiveMetaStore.main(new String[] {msPort} );
        Hide
        Amareshwari Sriramadasu added a comment -

        Looks fine. Will commit if tests pass.

        Show
        Amareshwari Sriramadasu added a comment - Looks fine. Will commit if tests pass.
        Hide
        Ashutosh Chauhan added a comment -

        Now throws the exception instead of doing System.exit. Didn't do it in MetaStoreUtils since there it is launched in a thread and run() doesn't allow to throw checked exceptions. I could have casted exception into RuntimeException but even that would not make sense because once exception is thrown in thread, there is no one who can catch it and do something with it.

        Show
        Ashutosh Chauhan added a comment - Now throws the exception instead of doing System.exit. Didn't do it in MetaStoreUtils since there it is launched in a thread and run() doesn't allow to throw checked exceptions. I could have casted exception into RuntimeException but even that would not make sense because once exception is thrown in thread, there is no one who can catch it and do something with it.
        Hide
        Amareshwari Sriramadasu added a comment -

        Patch removes System.exit calls and as logs warning saying it is exiting. Shouldn't it throw out the exceptions for exit?

        Show
        Amareshwari Sriramadasu added a comment - Patch removes System.exit calls and as logs warning saying it is exiting. Shouldn't it throw out the exceptions for exit?
        Hide
        Ashutosh Chauhan added a comment -

        As discussed in April Contributor meeting its good to get rid of System.exit. This patch removes all System.exit from Metastore directory.

        Show
        Ashutosh Chauhan added a comment - As discussed in April Contributor meeting its good to get rid of System.exit. This patch removes all System.exit from Metastore directory.

          People

          • Assignee:
            Ashutosh Chauhan
            Reporter:
            Ashutosh Chauhan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development