Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-375

TajoClient can't get result data when different os user

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Java Client
    • Labels:
      None

      Description

      When TajoClient run on different os user from TajoMaster's os user , TajoClient can't get result data from hdfs.
      If tajo cluster user name and client user name does not match that a permission denied exception will occur.
      A result file should be open by executed user name.

      1. TAJO-375.patch
        14 kB
        Hyoungjun Kim

        Activity

        Hide
        jihoonson Jihoon Son added a comment -

        How about change the title to represent the fundamental reason of the bug?
        I suggest 'The query results are stored on HDFS with an invalid permission'.

        Show
        jihoonson Jihoon Son added a comment - How about change the title to represent the fundamental reason of the bug? I suggest 'The query results are stored on HDFS with an invalid permission'.
        Hide
        hyunsik Hyunsik Choi added a comment -

        I think that this problem has to be fixed before 0.8 release. So, I adjusted its priority and fix version.

        Show
        hyunsik Hyunsik Choi added a comment - I think that this problem has to be fixed before 0.8 release. So, I adjusted its priority and fix version.
        Hide
        jhkim Jinho Kim added a comment -

        Jihoon,
        I think this is a bug.
        Currently, tajo can't support store per user. so the user name should be the same value internally.
        We should need tajo security by another new feature

        Show
        jhkim Jinho Kim added a comment - Jihoon, I think this is a bug. Currently, tajo can't support store per user. so the user name should be the same value internally. We should need tajo security by another new feature
        Hide
        jihoonson Jihoon Son added a comment -

        Ok.
        This is a temporal solution.
        Please add these details to the issue description.

        Show
        jihoonson Jihoon Son added a comment - Ok. This is a temporal solution. Please add these details to the issue description.
        Hide
        jihoonson Jihoon Son added a comment -

        Thanks for more plentiful description!

        Show
        jihoonson Jihoon Son added a comment - Thanks for more plentiful description!
        Hide
        hjkim Hyoungjun Kim added a comment -
        • Added tajoUserName variable in GetQueryResultResponse class
        • QueryMaster set tajoUserName with QueryMaster's os user
        • TajoClient get FileSystem instance with tajoUserName
        Show
        hjkim Hyoungjun Kim added a comment - Added tajoUserName variable in GetQueryResultResponse class QueryMaster set tajoUserName with QueryMaster's os user TajoClient get FileSystem instance with tajoUserName
        Hide
        hjkim Hyoungjun Kim added a comment -

        I attached a patch. please review this patch.

        Show
        hjkim Hyoungjun Kim added a comment - I attached a patch. please review this patch.
        Hide
        hyunsik Hyunsik Choi added a comment -

        I'm reviewing this.

        Show
        hyunsik Hyunsik Choi added a comment - I'm reviewing this.
        Hide
        hyunsik Hyunsik Choi added a comment -

        The patch looks good for me. Did you test this patch with different usernames? If you didn't, I'll test this patch with different os usernames.

        Show
        hyunsik Hyunsik Choi added a comment - The patch looks good for me. Did you test this patch with different usernames? If you didn't, I'll test this patch with different os usernames.
        Hide
        hjkim Hyoungjun Kim added a comment -

        I tested with different user.

        Show
        hjkim Hyoungjun Kim added a comment - I tested with different user.
        Hide
        hyunsik Hyunsik Choi added a comment -

        +1

        Show
        hyunsik Hyunsik Choi added a comment - +1
        Hide
        hyunsik Hyunsik Choi added a comment -

        This is a good workaround code. committed this patch to master. thanks!

        Show
        hyunsik Hyunsik Choi added a comment - This is a good workaround code. committed this patch to master. thanks!
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-trunk-postcommit #588 (See https://builds.apache.org/job/Tajo-trunk-postcommit/588/)
        TAJO-375: TajoClient can't get result data when different os user. (hyoungjunkim via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=ab2da738b962e0e4b6687d24d74b28d573634984)

        • tajo-core/tajo-core-backend/src/main/proto/ClientProtos.proto
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/client/TajoClient.java
        • CHANGES.txt
        • tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/FileScanner.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/worker/TajoWorkerClientService.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/jdbc/TajoResultSet.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/cli/TajoCli.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java
        • tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/CSVFile.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMasterClientService.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-trunk-postcommit #588 (See https://builds.apache.org/job/Tajo-trunk-postcommit/588/ ) TAJO-375 : TajoClient can't get result data when different os user. (hyoungjunkim via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=ab2da738b962e0e4b6687d24d74b28d573634984 ) tajo-core/tajo-core-backend/src/main/proto/ClientProtos.proto tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/client/TajoClient.java CHANGES.txt tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/FileScanner.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/worker/TajoWorkerClientService.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/jdbc/TajoResultSet.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/cli/TajoCli.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/CSVFile.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMasterClientService.java

          People

          • Assignee:
            hjkim Hyoungjun Kim
            Reporter:
            hjkim Hyoungjun Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development