peacewong commented on pull request #1353:
URL: 
https://github.com/apache/incubator-linkis/pull/1353#issuecomment-1031023068


   > yes, it is better to collect all this kind of paths and create them in 
install script. what is your suggestion? we can discard this pull request and I 
give a paths list to you guys to help me check whether they are ok to create in 
install script; or we can merge this pull request and I open another feature to 
do improvement in install script? If all paths are created in install scripts 
or java code, we can avoid so many problems about path privileges.
   
   Thank you, I suggest to close this pr, because if there is no permission, it 
may cause the interface call to fail. It is more reasonable to modify it in the 
installation script. You can refer to the creation methods of other directories.
   
[install.sh](https://github.com/apache/incubator-linkis/blob/master/assembly-combined-package/bin/install.sh)
   ```
   ########################  init hdfs and db  ################################
    if [ "$HDFS_USER_ROOT_PATH" != "" ]
    then
        localRootDir=$HDFS_USER_ROOT_PATH
      if [[ $HDFS_USER_ROOT_PATH == file://* ]];then
        localRootDir=${HDFS_USER_ROOT_PATH#file://}
        mkdir -p $localRootDir/$deployUser
        sudo chmod -R 775 $localRootDir/$deployUser
      elif [[ $HDFS_USER_ROOT_PATH == hdfs://* ]];then
        localRootDir=${HDFS_USER_ROOT_PATH#hdfs://}
        hdfs dfs -mkdir -p $localRootDir/$deployUser
      else
        echo "does not support $HDFS_USER_ROOT_PATH filesystem types"
      fi
    fi
    isSuccess "create  $HDFS_USER_ROOT_PATH directory"
   
   
    if [ "$RESULT_SET_ROOT_PATH" != "" ]
    then
      localRootDir=$RESULT_SET_ROOT_PATH
      if [[ $RESULT_SET_ROOT_PATH == file://* ]];then
        localRootDir=${RESULT_SET_ROOT_PATH#file://}
            mkdir -p $localRootDir/$deployUser
            sudo chmod -R 775 $localRootDir/$deployUser
      elif [[ $RESULT_SET_ROOT_PATH == hdfs://* ]];then
        localRootDir=${RESULT_SET_ROOT_PATH#hdfs://}
            hdfs dfs -mkdir -p $localRootDir/$deployUser
   
      else
        echo "does not support $RESULT_SET_ROOT_PATH filesystem types"
      fi
    fi
    isSuccess "create  $RESULT_SET_ROOT_PATH directory"
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to