本文整理了Java中org.apache.hadoop.hive.ql.exec.Utilities.makeProperties()
方法的一些代码示例,展示了Utilities.makeProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.makeProperties()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.exec.Utilities
类名称:Utilities
方法名:makeProperties
暂无
代码示例来源:origin: apache/hive
public static TableDesc getTableDesc(String cols, String colTypes) {
return (new TableDesc(SequenceFileInputFormat.class,
HiveSequenceFileOutputFormat.class, Utilities.makeProperties(
serdeConstants.SERIALIZATION_FORMAT, "" + Utilities.ctrlaCode,
serdeConstants.LIST_COLUMNS, cols,
serdeConstants.LIST_COLUMN_TYPES, colTypes,
serdeConstants.SERIALIZATION_LIB,LazySimpleSerDe.class.getName())));
}
代码示例来源:origin: apache/drill
public static TableDesc getTableDesc(String cols, String colTypes) {
return (new TableDesc(SequenceFileInputFormat.class,
HiveSequenceFileOutputFormat.class, Utilities.makeProperties(
serdeConstants.SERIALIZATION_FORMAT, "" + Utilities.ctrlaCode,
serdeConstants.LIST_COLUMNS, cols,
serdeConstants.LIST_COLUMN_TYPES, colTypes,
serdeConstants.SERIALIZATION_LIB,LazySimpleSerDe.class.getName())));
}
代码示例来源:origin: apache/drill
/**
* Generate the table descriptor of MetadataTypedColumnsetSerDe with the
* separatorCode. MetaDataTypedColumnsetSerDe is used because LazySimpleSerDe
* does not support a table with a single column "col" with type
* "array<string>".
*/
public static TableDesc getDefaultTableDesc(String separatorCode) {
return new TableDesc(
TextInputFormat.class, IgnoreKeyTextOutputFormat.class, Utilities
.makeProperties(
org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT,separatorCode,
serdeConstants.SERIALIZATION_LIB,MetadataTypedColumnsetSerDe.class.getName()));
}
代码示例来源:origin: apache/hive
public static TableDesc createTableDesc(StructObjectInspector oI) {
Map<String,String> props = new HashMap<String,String>();
PTFDeserializer.addOIPropertiestoSerDePropsMap(oI, props);
String colNames = props.get(serdeConstants.LIST_COLUMNS);
String colTypes = props.get(serdeConstants.LIST_COLUMN_TYPES);
TableDesc tblDesc = new TableDesc(
PTFSequenceFileInputFormat.class, PTFHiveSequenceFileOutputFormat.class,
Utilities.makeProperties(
serdeConstants.SERIALIZATION_FORMAT, ""+ Utilities.ctrlaCode,
serdeConstants.LIST_COLUMNS, colNames.toString(),
serdeConstants.LIST_COLUMN_TYPES,colTypes.toString(),
serdeConstants.SERIALIZATION_LIB,LazyBinarySerDe.class.getName()));
return tblDesc;
}
代码示例来源:origin: apache/drill
public static TableDesc createTableDesc(StructObjectInspector oI) {
Map<String,String> props = new HashMap<String,String>();
PTFDeserializer.addOIPropertiestoSerDePropsMap(oI, props);
String colNames = props.get(serdeConstants.LIST_COLUMNS);
String colTypes = props.get(serdeConstants.LIST_COLUMN_TYPES);
TableDesc tblDesc = new TableDesc(
PTFSequenceFileInputFormat.class, PTFHiveSequenceFileOutputFormat.class,
Utilities.makeProperties(
serdeConstants.SERIALIZATION_FORMAT, ""+ Utilities.ctrlaCode,
serdeConstants.LIST_COLUMNS, colNames.toString(),
serdeConstants.LIST_COLUMN_TYPES,colTypes.toString(),
serdeConstants.SERIALIZATION_LIB,LazyBinarySerDe.class.getName()));
return tblDesc;
}
代码示例来源:origin: apache/hive
boolean useDelimitedJSON, String fileFormat) {
Properties properties = Utilities.makeProperties(
serdeConstants.SERIALIZATION_FORMAT, separatorCode, serdeConstants.LIST_COLUMNS,
columns);
代码示例来源:origin: apache/hive
/**
* Generate the table descriptor for intermediate files.
*/
public static TableDesc getReduceValueTableDesc(List<FieldSchema> fieldSchemas) {
return new TableDesc(SequenceFileInputFormat.class,
SequenceFileOutputFormat.class, Utilities.makeProperties(
serdeConstants.LIST_COLUMNS, MetaStoreUtils
.getColumnNamesFromFieldSchema(fieldSchemas),
serdeConstants.LIST_COLUMN_TYPES, MetaStoreUtils
.getColumnTypesFromFieldSchema(fieldSchemas),
serdeConstants.ESCAPE_CHAR, "\\",
serdeConstants.SERIALIZATION_LIB,LazyBinarySerDe.class.getName()));
}
代码示例来源:origin: apache/drill
boolean useDelimitedJSON, String fileFormat) {
Properties properties = Utilities.makeProperties(
serdeConstants.SERIALIZATION_FORMAT, separatorCode, serdeConstants.LIST_COLUMNS,
columns);
代码示例来源:origin: apache/hive
TableDesc tblDesc = new TableDesc(
SequenceFileInputFormat.class, HiveSequenceFileOutputFormat.class,
Utilities.makeProperties(
org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, ""
+ Utilities.ctrlaCode,
代码示例来源:origin: apache/drill
/**
* Generate the table descriptor for intermediate files.
*/
public static TableDesc getReduceValueTableDesc(List<FieldSchema> fieldSchemas) {
return new TableDesc(SequenceFileInputFormat.class,
SequenceFileOutputFormat.class, Utilities.makeProperties(
serdeConstants.LIST_COLUMNS, MetaStoreUtils
.getColumnNamesFromFieldSchema(fieldSchemas),
serdeConstants.LIST_COLUMN_TYPES, MetaStoreUtils
.getColumnTypesFromFieldSchema(fieldSchemas),
serdeConstants.ESCAPE_CHAR, "\\",
serdeConstants.SERIALIZATION_LIB,LazyBinarySerDe.class.getName()));
}
代码示例来源:origin: apache/drill
TableDesc tblDesc = new TableDesc(
SequenceFileInputFormat.class, HiveSequenceFileOutputFormat.class,
Utilities.makeProperties(
org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, ""
+ Utilities.ctrlaCode,
代码示例来源:origin: apache/hive
/**
* Generate the table descriptor for Map-side join value.
*/
public static TableDesc getMapJoinValueTableDesc(
List<FieldSchema> fieldSchemas) {
return new TableDesc(SequenceFileInputFormat.class,
SequenceFileOutputFormat.class, Utilities.makeProperties(
serdeConstants.LIST_COLUMNS, MetaStoreUtils
.getColumnNamesFromFieldSchema(fieldSchemas),
serdeConstants.COLUMN_NAME_DELIMITER, MetaStoreUtils.getColumnNameDelimiter(fieldSchemas),
serdeConstants.LIST_COLUMN_TYPES, MetaStoreUtils
.getColumnTypesFromFieldSchema(fieldSchemas),
serdeConstants.ESCAPE_CHAR, "\\",
serdeConstants.SERIALIZATION_LIB,LazyBinarySerDe.class.getName()));
}
代码示例来源:origin: apache/hive
Utilities.makeProperties(serdeConstants.LIST_COLUMNS, MetaStoreUtils
.getColumnNamesFromFieldSchema(fieldSchemas),
serdeConstants.COLUMN_NAME_DELIMITER, MetaStoreUtils.getColumnNameDelimiter(fieldSchemas),
} else {
return new TableDesc(SequenceFileInputFormat.class,
SequenceFileOutputFormat.class, Utilities.makeProperties("columns",
MetaStoreUtils.getColumnNamesFromFieldSchema(fieldSchemas),
"columns.types", MetaStoreUtils
代码示例来源:origin: apache/hive
/**
* Generate the table descriptor for reduce key.
*/
public static TableDesc getReduceKeyTableDesc(List<FieldSchema> fieldSchemas,
String order, String nullOrder) {
return new TableDesc(
SequenceFileInputFormat.class, SequenceFileOutputFormat.class,
Utilities.makeProperties(serdeConstants.LIST_COLUMNS, MetaStoreUtils
.getColumnNamesFromFieldSchema(fieldSchemas),
serdeConstants.COLUMN_NAME_DELIMITER, MetaStoreUtils.getColumnNameDelimiter(fieldSchemas),
serdeConstants.LIST_COLUMN_TYPES, MetaStoreUtils
.getColumnTypesFromFieldSchema(fieldSchemas),
serdeConstants.SERIALIZATION_SORT_ORDER, order,
serdeConstants.SERIALIZATION_NULL_SORT_ORDER, nullOrder,
serdeConstants.SERIALIZATION_LIB, BinarySortableSerDe.class.getName()));
}
代码示例来源:origin: apache/drill
/**
* Generate the table descriptor for Map-side join value.
*/
public static TableDesc getMapJoinValueTableDesc(
List<FieldSchema> fieldSchemas) {
return new TableDesc(SequenceFileInputFormat.class,
SequenceFileOutputFormat.class, Utilities.makeProperties(
serdeConstants.LIST_COLUMNS, MetaStoreUtils
.getColumnNamesFromFieldSchema(fieldSchemas),
serdeConstants.COLUMN_NAME_DELIMITER, MetaStoreUtils.getColumnNameDelimiter(fieldSchemas),
serdeConstants.LIST_COLUMN_TYPES, MetaStoreUtils
.getColumnTypesFromFieldSchema(fieldSchemas),
serdeConstants.ESCAPE_CHAR, "\\",
serdeConstants.SERIALIZATION_LIB,LazyBinarySerDe.class.getName()));
}
代码示例来源:origin: apache/drill
Utilities.makeProperties(serdeConstants.LIST_COLUMNS, MetaStoreUtils
.getColumnNamesFromFieldSchema(fieldSchemas),
serdeConstants.COLUMN_NAME_DELIMITER, MetaStoreUtils.getColumnNameDelimiter(fieldSchemas),
} else {
return new TableDesc(SequenceFileInputFormat.class,
SequenceFileOutputFormat.class, Utilities.makeProperties("columns",
MetaStoreUtils.getColumnNamesFromFieldSchema(fieldSchemas),
"columns.types", MetaStoreUtils
代码示例来源:origin: apache/drill
/**
* Generate the table descriptor for reduce key.
*/
public static TableDesc getReduceKeyTableDesc(List<FieldSchema> fieldSchemas,
String order, String nullOrder) {
return new TableDesc(
SequenceFileInputFormat.class, SequenceFileOutputFormat.class,
Utilities.makeProperties(serdeConstants.LIST_COLUMNS, MetaStoreUtils
.getColumnNamesFromFieldSchema(fieldSchemas),
serdeConstants.COLUMN_NAME_DELIMITER, MetaStoreUtils.getColumnNameDelimiter(fieldSchemas),
serdeConstants.LIST_COLUMN_TYPES, MetaStoreUtils
.getColumnTypesFromFieldSchema(fieldSchemas),
serdeConstants.SERIALIZATION_SORT_ORDER, order,
serdeConstants.SERIALIZATION_NULL_SORT_ORDER, nullOrder,
serdeConstants.SERIALIZATION_LIB, BinarySortableSerDe.class.getName()));
}
代码示例来源:origin: apache/hive
/**
* Generate the table descriptor for intermediate files.
*/
public static TableDesc getIntermediateFileTableDesc(
List<FieldSchema> fieldSchemas) {
return new TableDesc(SequenceFileInputFormat.class,
SequenceFileOutputFormat.class, Utilities.makeProperties(
serdeConstants.LIST_COLUMNS, MetaStoreUtils
.getColumnNamesFromFieldSchema(fieldSchemas),
serdeConstants.COLUMN_NAME_DELIMITER, MetaStoreUtils.getColumnNameDelimiter(fieldSchemas),
serdeConstants.COLUMN_NAME_DELIMITER, MetaStoreUtils.getColumnNameDelimiter(fieldSchemas),
serdeConstants.LIST_COLUMN_TYPES, MetaStoreUtils
.getColumnTypesFromFieldSchema(fieldSchemas),
serdeConstants.ESCAPE_CHAR, "\\",
serdeConstants.SERIALIZATION_LIB,LazyBinarySerDe.class.getName()));
}
代码示例来源:origin: apache/drill
/**
* Generate the table descriptor for intermediate files.
*/
public static TableDesc getIntermediateFileTableDesc(
List<FieldSchema> fieldSchemas) {
return new TableDesc(SequenceFileInputFormat.class,
SequenceFileOutputFormat.class, Utilities.makeProperties(
serdeConstants.LIST_COLUMNS, MetaStoreUtils
.getColumnNamesFromFieldSchema(fieldSchemas),
serdeConstants.COLUMN_NAME_DELIMITER, MetaStoreUtils.getColumnNameDelimiter(fieldSchemas),
serdeConstants.COLUMN_NAME_DELIMITER, MetaStoreUtils.getColumnNameDelimiter(fieldSchemas),
serdeConstants.LIST_COLUMN_TYPES, MetaStoreUtils
.getColumnTypesFromFieldSchema(fieldSchemas),
serdeConstants.ESCAPE_CHAR, "\\",
serdeConstants.SERIALIZATION_LIB,LazyBinarySerDe.class.getName()));
}
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
public static TableDesc getTableDesc(String cols, String colTypes) {
return (new TableDesc(LazySimpleSerDe.class, SequenceFileInputFormat.class,
HiveSequenceFileOutputFormat.class, Utilities.makeProperties(
org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "" + Utilities.ctrlaCode,
org.apache.hadoop.hive.serde.Constants.LIST_COLUMNS, cols,
org.apache.hadoop.hive.serde.Constants.LIST_COLUMN_TYPES, colTypes)));
}
内容来源于网络,如有侵权,请联系作者删除!