Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-1001

Knox Shell Sqoop.Request class is Package Private

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.14.0
    • ClientDSL
    • None

    Description

      org.apache.hadoop.gateway.shell.job.Sqoop.Request class is package-private. This causes compilation errors when trying to submit sqoop job from a class in a different package.
      For example:

      package test.knox.sqoop;
      
      import org.apache.hadoop.gateway.shell.Hadoop;
      import org.apache.hadoop.gateway.shell.job.Job;
      
      public class TestSqoop {
        public static void main( String[] args ) {
          try {
            Hadoop session = Hadoop.login( "test", "test", "test" );
            String text = Job.submitSqoop( session ).command( "test command" ).libdir( "libdir" ).now().getString();
            session.shutdown();
          } catch ( Exception e ) {
            e.printStackTrace();
          }
        }
      }
      

      It results in the following errors:

      [ERROR] COMPILATION ERROR :
      [INFO] -------------------------------------------------------------
      [ERROR] /home/andrei/knox-sqoop/src/main/java/test/knox/sqoop/TestSqoop.java:[10,47] command(java.lang.String) in org.apache.hadoop.gateway.shell.job.Sqoop.Request is defined in an inaccessible class or interface
      [ERROR] /home/andrei/knox-sqoop/src/main/java/test/knox/sqoop/TestSqoop.java:[10,73] libdir(java.lang.String) in org.apache.hadoop.gateway.shell.job.Sqoop.Request is defined in an inaccessible class or interface
      [ERROR] /home/andrei/knox-sqoop/src/main/java/test/knox/sqoop/TestSqoop.java:[10,92] now() in org.apache.hadoop.gateway.shell.AbstractRequest is defined in an inaccessible class or interface
      [INFO] 3 errors
      

      The Request class needs to be made public.

      Attachments

        1. KNOX-1001.patch
          1 kB
          Jeffrey E Rodriguez

        Activity

          People

            andrei_viaryshka Andrei Viaryshka
            andrei_viaryshka Andrei Viaryshka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: