private int getBucketProperty(Object row) {
    Object bucketProperty = ((Object[]) row)[2];
    if (bucketProperty instanceof Writable) {
      return ((IntWritable) bucketProperty).get();
    } else {
      return (int) bucketProperty;
    }
  }
Get the bucket property as an int from the row. This is necessary because
VectorFileSinkOperator wraps row values in Writable objects.
@param row as Object
@return bucket property as int
ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java