cascading.util.Util.removeNulls()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(199)

本文整理了Java中cascading.util.Util.removeNulls()方法的一些代码示例,展示了Util.removeNulls()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.removeNulls()方法的具体详情如下:
包路径:cascading.util.Util
类名称:Util
方法名:removeNulls

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;

相关文章