本文整理汇总了C#中Configuration.get方法的典型用法代码示例。如果您正苦于以下问题:C# Configuration.get方法的具体用法?C# Configuration.get怎么用?C# Configuration.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration
的用法示例。
在下文中一共展示了Configuration.get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createFromConf
public static SearchArgument createFromConf(Configuration conf)
{
string sargString;
if ((sargString = conf.get(TableScanDesc.FILTER_EXPR_CONF_STR)) != null)
{
return create(Utilities.deserializeExpression(sargString));
}
else if ((sargString = conf.get(SARG_PUSHDOWN)) != null)
{
return create(sargString);
}
return null;
}
示例2: canCreateFromConf
public static bool canCreateFromConf(Configuration conf)
{
return conf.get(TableScanDesc.FILTER_EXPR_CONF_STR) != null || conf.get(SARG_PUSHDOWN) != null;
}
示例3: getDesiredRowTypeDescr
public static TypeDescription getDesiredRowTypeDescr(Configuration conf)
{
string columnNameProperty = null;
string columnTypeProperty = null;
IList<string> schemaEvolutionColumnNames = null;
List<TypeDescription> schemaEvolutionTypeDescrs = null;
bool haveSchemaEvolutionProperties = false;
if (HiveConf.getBoolVar(conf, ConfVars.HIVE_SCHEMA_EVOLUTION))
{
columnNameProperty = conf.get(IOConstants.SCHEMA_EVOLUTION_COLUMNS);
columnTypeProperty = conf.get(IOConstants.SCHEMA_EVOLUTION_COLUMNS_TYPES);
haveSchemaEvolutionProperties =
(columnNameProperty != null && columnTypeProperty != null);
if (haveSchemaEvolutionProperties)
{
schemaEvolutionColumnNames = columnNameProperty.Split(',');
if (schemaEvolutionColumnNames.Count == 0)
{
haveSchemaEvolutionProperties = false;
}
else
{
schemaEvolutionTypeDescrs =
OrcUtils.typeDescriptionsFromHiveTypeProperty(columnTypeProperty);
if (schemaEvolutionTypeDescrs.Count != schemaEvolutionColumnNames.Count)
{
haveSchemaEvolutionProperties = false;
}
}
}
}
if (!haveSchemaEvolutionProperties)
{
// Try regular properties;
columnNameProperty = conf.get(serdeConstants.LIST_COLUMNS);
columnTypeProperty = conf.get(serdeConstants.LIST_COLUMN_TYPES);
if (columnTypeProperty == null || columnNameProperty == null)
{
return null;
}
schemaEvolutionColumnNames = columnNameProperty.Split(',');
if (schemaEvolutionColumnNames.Count == 0)
{
return null;
}
schemaEvolutionTypeDescrs =
OrcUtils.typeDescriptionsFromHiveTypeProperty(columnTypeProperty);
if (schemaEvolutionTypeDescrs.Count != schemaEvolutionColumnNames.Count)
{
return null;
}
}
// Desired schema does not include virtual columns or partition columns.
TypeDescription result = TypeDescription.createStruct();
for (int i = 0; i < schemaEvolutionColumnNames.Count; i++)
{
result.addField(schemaEvolutionColumnNames[i], schemaEvolutionTypeDescrs[i]);
}
return result;
}