本文整理了Java中cascading.util.Util.removeNulls()
方法的一些代码示例,展示了Util.removeNulls()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.removeNulls()
方法的具体详情如下:
包路径:cascading.util.Util
类名称:Util
方法名:removeNulls
暂无
代码示例来源:origin: elastic/elasticsearch-hadoop
cfg.set(TupleSerializationProps.SERIALIZATION_TOKENS, Util.join(",", Util.removeNulls(tokens, id + "=" + lmw)));
LogFactory.getLog(EsTap.class).trace(String.format("Registered Cascading serialization token %s for %s", id, lmw));
return;
代码示例来源:origin: cwensel/cascading
/**
* Adds the given className as a Hadoop IO serialization class.
*
* @param properties of type Map
* @param className of type String
*/
public static void addSerialization( Map<Object, Object> properties, String className )
{
String serializations = (String) properties.get( HADOOP_IO_SERIALIZATIONS );
properties.put( HADOOP_IO_SERIALIZATIONS, Util.join( ",", Util.removeNulls( serializations, className ) ) );
}
代码示例来源:origin: cascading/cascading-hadoop2-io
/**
* Adds the given className as a Hadoop IO serialization class.
*
* @param properties of type Map
* @param className of type String
*/
public static void addSerialization( Map<Object, Object> properties, String className )
{
String serializations = (String) properties.get( HADOOP_IO_SERIALIZATIONS );
properties.put( HADOOP_IO_SERIALIZATIONS, Util.join( ",", Util.removeNulls( serializations, className ) ) );
}
代码示例来源:origin: cwensel/cascading
public ChildFirstURLClassLoader( String[] exclusions, URL... urls )
{
super( Thread.currentThread().getContextClassLoader() );
this.exclusions = Util.removeNulls( exclusions );
childClassLoader = new ChildURLClassLoader( urls, this.getParent() );
if( LOG.isDebugEnabled() )
LOG.debug( "child first classloader exclusions: {}", Arrays.toString( exclusions ) );
}
代码示例来源:origin: cwensel/cascading
@Override
protected void addPropertiesTo( Properties properties )
{
for( String codec : codecs )
{
String codecs = (String) properties.get( SPILL_CODECS );
properties.put( SPILL_CODECS, Util.join( ",", Util.removeNulls( codecs, codec ) ) );
}
properties.setProperty( SPILL_COMPRESS, Boolean.toString( compressSpill ) );
properties.setProperty( LIST_THRESHOLD, Integer.toString( listSpillThreshold ) );
properties.setProperty( MAP_THRESHOLD, Integer.toString( mapSpillThreshold ) );
properties.setProperty( MAP_CAPACITY, Integer.toString( mapInitialCapacity ) );
properties.setProperty( MAP_LOADFACTOR, Float.toString( mapLoadFactor ) );
}
}
代码示例来源:origin: cwensel/cascading
/**
* Adds the given token and className pair as a serialization token property. During object serialization and deserialization,
* the given token will be used instead of the className when an instance of the className is encountered.
*
* @param properties of type Map
* @param token of type int
* @param className of type String
*/
public static void addSerializationToken( Map<Object, Object> properties, int token, String className )
{
String tokens = getSerializationTokens( properties );
properties.put( SERIALIZATION_TOKENS, Util.join( ",", Util.removeNulls( tokens, token + "=" + className ) ) );
}
代码示例来源:origin: cascading/cascading-hadoop2-io
/**
* Adds the given token and className pair as a serialization token property. During object serialization and deserialization,
* the given token will be used instead of the className when an instance of the className is encountered.
*
* @param properties of type Map
* @param token of type int
* @param className of type String
*/
public static void addSerializationToken( Map<Object, Object> properties, int token, String className )
{
String tokens = getSerializationTokens( properties );
properties.put( SERIALIZATION_TOKENS, Util.join( ",", Util.removeNulls( tokens, token + "=" + className ) ) );
}
代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop
cfg.set(TupleSerializationProps.SERIALIZATION_TOKENS, Util.join(",", Util.removeNulls(tokens, id + "=" + lmw)));
LogFactory.getLog(EsTap.class).trace(String.format("Registered Cascading serialization token %s for %s", id, lmw));
return;
内容来源于网络,如有侵权,请联系作者删除!