@Override
  protected void doAlteration(Table table, Partition partition) throws HiveException {
    StorageDescriptor sd = getStorageDescriptor(table, partition);
    sd.setBucketCols(new ArrayList<String>());
    sd.setNumBuckets(-1); // -1 buckets means to turn off bucketing
    sd.setSortCols(new ArrayList<Order>());
  }
Operation process of turning off clustering.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/cluster/AlterTableNotClusteredOperation.java