public boolean isLocal() {
    LoadTableDesc tbd = work.getLoadTableWork();
    if (tbd != null) {
      return false;
    }

    LoadFileDesc lfd = work.getLoadFileWork();
    if (lfd != null) {
      if (lfd.getIsDfsDir()) {
        return false;
      } else {
        return true;
      }
    }

    return false;
  }
Alters the bucketing and/or sorting columns of the partition provided they meet some
validation criteria, e.g. the number of buckets match the number of files, and the
columns are not partition columns
@param table
@param partn
@param bucketCols
@param numBuckets
@param sortCols
@throws IOException
@throws InvalidOperationException
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java