private StorageDescriptor convertToStorageDescriptor(
      MStorageDescriptor msd, boolean noFS, boolean isAcidTable) throws MetaException {
    if (msd == null) {
      return null;
    }
    List<MFieldSchema> mFieldSchemas;
    if (noFS) {
      mFieldSchemas = Collections.emptyList();
    } else {
      mFieldSchemas = msd.getCD() == null ? null : msd.getCD().getCols();
    }
    List<Order> orderList = (isAcidTable) ? Collections.emptyList() : convertToOrders(msd.getSortCols());
    List<String> bucList = convertList(msd.getBucketCols());
    SkewedInfo skewedInfo = null;

    Map<String, String> sdParams = isAcidTable ? Collections.emptyMap() : convertMap(msd.getParameters());
    StorageDescriptor sd = new StorageDescriptor(convertToFieldSchemas(mFieldSchemas),
        msd.getLocation(), msd.getInputFormat(), msd.getOutputFormat(), msd
        .isCompressed(), msd.getNumBuckets(),
        (!isAcidTable) ? convertToSerDeInfo(msd.getSerDeInfo(), true)
            : new SerDeInfo(msd.getSerDeInfo().getName(), msd.getSerDeInfo().getSerializationLib(), Collections.emptyMap()),
        bucList , orderList, sdParams);
    if (!isAcidTable) {
      skewedInfo = new SkewedInfo(convertList(msd.getSkewedColNames()),
          convertToSkewedValues(msd.getSkewedColValues()),
          covertToSkewedMap(msd.getSkewedColValueLocationMaps()));
    } else {
      skewedInfo = new SkewedInfo(Collections.emptyList(), Collections.emptyList(),
          Collections.emptyMap());
    }
    sd.setSkewedInfo(skewedInfo);
    sd.setStoredAsSubDirectories(msd.isStoredAsSubDirectories());
    return sd;
  }
Given a list of model field schemas, create a new model column descriptor.
@param cols the columns the column descriptor contains
@return a new column descriptor db-backed object
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java