anchor.diff:  #!/bin/bash
   
   help() {
  -  echo "usage: $0 localWorkdir srcFileInHdfs HDFS_USER"
  +  echo "usage: $0 localWorkdir srcFileInHdfs IMPERSONATED_USERNAME"
     exit 1
   }
   
  
positive.code: 
  workdir=$1
  hdfsFile="$2"
  HDFS_USER=$3
  
  #FSM states: STAGING, UNZIPPING, UPLOADING, CHOWNING, SUCCESS, FAILED
  fsmFile="$(dirname $1)/fsm-$(basename $1).txt"
  
negative.code: check_error
  
  echo "CHOWNING" > $fsmFile
  <%= node['hops']['base_dir'] %>/bin/hdfs dfs -chown -R ${IMPERSONATED_USERNAME} "$dir"
  check_error
  
  echo "SUCCESS" > $fsmFile
  