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

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

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

Util.split介绍

暂无

代码示例

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

public static <T> List<T> split( Class<T> type, String values )
 {
 return split( type, ",", values );
 }

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

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

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

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

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

/**
 * Maps each input to an ordinal on the flowelement. an input may be bound to multiple ordinals.
 *
 * @param element
 */
private SortedListMultiMap<Integer, LogicalInput> createInputMap( FlowElement element )
 {
 String id = FlowElements.id( element );
 SortedListMultiMap<Integer, LogicalInput> ordinalMap = new SortedListMultiMap<>();
 for( LogicalInput logicalInput : inputMap.values() )
  {
  Configuration configuration = inputConfigMap.get( logicalInput );
  String foundID = configuration.get( "cascading.node.source" );
  if( Util.isEmpty( foundID ) )
   throw new IllegalStateException( "cascading.node.source property not set on source LogicalInput" );
  if( !foundID.equals( id ) )
   continue;
  String values = configuration.get( "cascading.node.ordinals", "" );
  List<Integer> ordinals = Util.split( Integer.class, ",", values );
  for( Integer ordinal : ordinals )
   ordinalMap.put( ordinal, logicalInput );
  }
 return ordinalMap;
 }

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

/**
 * Maps each input to an ordinal on the flowelement. an input may be bound to multiple ordinals.
 *
 * @param element
 */
private SortedListMultiMap<Integer, LogicalInput> createInputMap( FlowElement element )
 {
 String id = FlowElements.id( element );
 SortedListMultiMap<Integer, LogicalInput> ordinalMap = new SortedListMultiMap<>();
 for( LogicalInput logicalInput : inputMap.values() )
  {
  Configuration configuration = inputConfigMap.get( logicalInput );
  String foundID = configuration.get( "cascading.node.source" );
  if( Util.isEmpty( foundID ) )
   throw new IllegalStateException( "cascading.node.source property not set on source LogicalInput" );
  if( !foundID.equals( id ) )
   continue;
  String values = configuration.get( "cascading.node.ordinals", "" );
  List<Integer> ordinals = Util.split( Integer.class, ",", values );
  for( Integer ordinal : ordinals )
   ordinalMap.put( ordinal, logicalInput );
  }
 return ordinalMap;
 }

相关文章