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

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

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

Util.removeNulls介绍

暂无

代码示例

代码示例来源:origin: elastic/elasticsearch-hadoop

  1. cfg.set(TupleSerializationProps.SERIALIZATION_TOKENS, Util.join(",", Util.removeNulls(tokens, id + "=" + lmw)));
  2. LogFactory.getLog(EsTap.class).trace(String.format("Registered Cascading serialization token %s for %s", id, lmw));
  3. return;

代码示例来源:origin: cwensel/cascading

  1. /**
  2. * Adds the given className as a Hadoop IO serialization class.
  3. *
  4. * @param properties of type Map
  5. * @param className of type String
  6. */
  7. public static void addSerialization( Map<Object, Object> properties, String className )
  8. {
  9. String serializations = (String) properties.get( HADOOP_IO_SERIALIZATIONS );
  10. properties.put( HADOOP_IO_SERIALIZATIONS, Util.join( ",", Util.removeNulls( serializations, className ) ) );
  11. }

代码示例来源:origin: cascading/cascading-hadoop2-io

  1. /**
  2. * Adds the given className as a Hadoop IO serialization class.
  3. *
  4. * @param properties of type Map
  5. * @param className of type String
  6. */
  7. public static void addSerialization( Map<Object, Object> properties, String className )
  8. {
  9. String serializations = (String) properties.get( HADOOP_IO_SERIALIZATIONS );
  10. properties.put( HADOOP_IO_SERIALIZATIONS, Util.join( ",", Util.removeNulls( serializations, className ) ) );
  11. }

代码示例来源:origin: cwensel/cascading

  1. public ChildFirstURLClassLoader( String[] exclusions, URL... urls )
  2. {
  3. super( Thread.currentThread().getContextClassLoader() );
  4. this.exclusions = Util.removeNulls( exclusions );
  5. childClassLoader = new ChildURLClassLoader( urls, this.getParent() );
  6. if( LOG.isDebugEnabled() )
  7. LOG.debug( "child first classloader exclusions: {}", Arrays.toString( exclusions ) );
  8. }

代码示例来源:origin: cwensel/cascading

  1. @Override
  2. protected void addPropertiesTo( Properties properties )
  3. {
  4. for( String codec : codecs )
  5. {
  6. String codecs = (String) properties.get( SPILL_CODECS );
  7. properties.put( SPILL_CODECS, Util.join( ",", Util.removeNulls( codecs, codec ) ) );
  8. }
  9. properties.setProperty( SPILL_COMPRESS, Boolean.toString( compressSpill ) );
  10. properties.setProperty( LIST_THRESHOLD, Integer.toString( listSpillThreshold ) );
  11. properties.setProperty( MAP_THRESHOLD, Integer.toString( mapSpillThreshold ) );
  12. properties.setProperty( MAP_CAPACITY, Integer.toString( mapInitialCapacity ) );
  13. properties.setProperty( MAP_LOADFACTOR, Float.toString( mapLoadFactor ) );
  14. }
  15. }

代码示例来源:origin: cwensel/cascading

  1. /**
  2. * Adds the given token and className pair as a serialization token property. During object serialization and deserialization,
  3. * the given token will be used instead of the className when an instance of the className is encountered.
  4. *
  5. * @param properties of type Map
  6. * @param token of type int
  7. * @param className of type String
  8. */
  9. public static void addSerializationToken( Map<Object, Object> properties, int token, String className )
  10. {
  11. String tokens = getSerializationTokens( properties );
  12. properties.put( SERIALIZATION_TOKENS, Util.join( ",", Util.removeNulls( tokens, token + "=" + className ) ) );
  13. }

代码示例来源:origin: cascading/cascading-hadoop2-io

  1. /**
  2. * Adds the given token and className pair as a serialization token property. During object serialization and deserialization,
  3. * the given token will be used instead of the className when an instance of the className is encountered.
  4. *
  5. * @param properties of type Map
  6. * @param token of type int
  7. * @param className of type String
  8. */
  9. public static void addSerializationToken( Map<Object, Object> properties, int token, String className )
  10. {
  11. String tokens = getSerializationTokens( properties );
  12. properties.put( SERIALIZATION_TOKENS, Util.join( ",", Util.removeNulls( tokens, token + "=" + className ) ) );
  13. }

代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop

  1. cfg.set(TupleSerializationProps.SERIALIZATION_TOKENS, Util.join(",", Util.removeNulls(tokens, id + "=" + lmw)));
  2. LogFactory.getLog(EsTap.class).trace(String.format("Registered Cascading serialization token %s for %s", id, lmw));
  3. return;

相关文章