Github user Ben-Zvi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1200#discussion_r179005732
  
    --- Diff: distribution/src/resources/drillbit.sh ---
    @@ -127,6 +127,44 @@ check_before_start()
       fi
     }
     
    +check_after_start(){
    +    #check if the process is running
    +    if [ -f $pid ]; then
    +      dbitProc=$(ps -ef | grep `cat $pid` | grep Drillbit)
    +      if [ -n "$dbitProc" ]; then
    +        # Check and enforce for CGroup
    +        if [ -n "$DRILLBIT_CGROUP" ]; then 
    +          check_and_enforce_cgroup `cat $pid`
    +        fi
    +      fi
    +    fi
    +}
    +
    +check_and_enforce_cgroup(){
    +    dbitPid=$1;
    +    #if [ $(`ps -o cgroup` | grep -c $DRILLBIT_CGROUP ) -eq 1 ]; then 
    +    if [ -f /cgroup/cpu/${DRILLBIT_CGROUP}/cgroup.procs ]; then 
    --- End diff --
    
    Why is the path hardcoded ? Is it a standard ?  I checked on my cluster, 
where /sys/fs/cgroup/..... is used instead.



---

Reply via email to