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

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

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

Util.split介绍

暂无

代码示例

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

  1. public static <T> List<T> split( Class<T> type, String values )
  2. {
  3. return split( type, ",", values );
  4. }

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

  1. public List<Integer> getOrdinals()
  2. {
  3. if( ordinals == null )
  4. ordinals = Util.split( Integer.class, ",", getConf().get( "cascading.node.ordinals" ) );
  5. return ordinals;
  6. }

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

  1. public List<Integer> getOrdinals()
  2. {
  3. if( ordinals == null )
  4. ordinals = Util.split( Integer.class, ",", getConf().get( "cascading.node.ordinals" ) );
  5. return ordinals;
  6. }

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

  1. /**
  2. * Maps each input to an ordinal on the flowelement. an input may be bound to multiple ordinals.
  3. *
  4. * @param element
  5. */
  6. private SortedListMultiMap<Integer, LogicalInput> createInputMap( FlowElement element )
  7. {
  8. String id = FlowElements.id( element );
  9. SortedListMultiMap<Integer, LogicalInput> ordinalMap = new SortedListMultiMap<>();
  10. for( LogicalInput logicalInput : inputMap.values() )
  11. {
  12. Configuration configuration = inputConfigMap.get( logicalInput );
  13. String foundID = configuration.get( "cascading.node.source" );
  14. if( Util.isEmpty( foundID ) )
  15. throw new IllegalStateException( "cascading.node.source property not set on source LogicalInput" );
  16. if( !foundID.equals( id ) )
  17. continue;
  18. String values = configuration.get( "cascading.node.ordinals", "" );
  19. List<Integer> ordinals = Util.split( Integer.class, ",", values );
  20. for( Integer ordinal : ordinals )
  21. ordinalMap.put( ordinal, logicalInput );
  22. }
  23. return ordinalMap;
  24. }

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

  1. /**
  2. * Maps each input to an ordinal on the flowelement. an input may be bound to multiple ordinals.
  3. *
  4. * @param element
  5. */
  6. private SortedListMultiMap<Integer, LogicalInput> createInputMap( FlowElement element )
  7. {
  8. String id = FlowElements.id( element );
  9. SortedListMultiMap<Integer, LogicalInput> ordinalMap = new SortedListMultiMap<>();
  10. for( LogicalInput logicalInput : inputMap.values() )
  11. {
  12. Configuration configuration = inputConfigMap.get( logicalInput );
  13. String foundID = configuration.get( "cascading.node.source" );
  14. if( Util.isEmpty( foundID ) )
  15. throw new IllegalStateException( "cascading.node.source property not set on source LogicalInput" );
  16. if( !foundID.equals( id ) )
  17. continue;
  18. String values = configuration.get( "cascading.node.ordinals", "" );
  19. List<Integer> ordinals = Util.split( Integer.class, ",", values );
  20. for( Integer ordinal : ordinals )
  21. ordinalMap.put( ordinal, logicalInput );
  22. }
  23. return ordinalMap;
  24. }

相关文章