@Test( expected = KettleException.class ) public void testAvroArrayExpansionInitThrowsExceptionIfExpansionPathIsEmpty() throws KettleException { new AvroInputData.AvroArrayExpansion( Collections.<AvroInputMeta.AvroField>emptyList() ).init(); }
protected void init() throws KettleException { if ( m_schemaToUse != null ) { initTopLevelStructure( m_schemaToUse, true ); if ( m_normalFields == null || m_normalFields.size() == 0 ) { m_normalFields = getLeafFields( m_schemaToUse ); } } if ( m_normalFields == null || m_normalFields.size() == 0 ) { throw new KettleException( BaseMessages.getString( AvroInputMeta.PKG, "AvroInput.Error.NoFieldPathsDefined" ) ); } m_expansionHandler = checkFieldPaths( m_normalFields, m_outputRowMeta ); for ( AvroInputMeta.AvroField f : m_normalFields ) { int outputIndex = m_outputRowMeta.indexOfValue( f.m_fieldName ); f.init( outputIndex ); } if ( m_expansionHandler != null ) { m_expansionHandler.init(); } }
AvroInputData extends BaseStepData implements StepDataInterface { protected void init() throws KettleException { if ( m_schemaToUse != null ) { initTopLevelStructure( m_schemaToUse, true ); if ( m_normalFields == null || m_normalFields.size() == 0 ) { m_normalFields = getLeafFields( m_schemaToUse ); } } if ( m_normalFields == null || m_normalFields.size() == 0 ) { throw new KettleException( BaseMessages.getString( AvroInputMeta.PKG, "AvroInput.Error.NoFieldPathsDefined" ) ); } m_expansionHandler = checkFieldPaths( m_normalFields, m_outputRowMeta ); for ( AvroInputMeta.AvroField f : m_normalFields ) { int outputIndex = m_outputRowMeta.indexOfValue( f.m_fieldName ); f.init( outputIndex ); } if ( m_expansionHandler != null ) { m_expansionHandler.init(); } } }
AvroInputData extends BaseStepData implements StepDataInterface { protected void init() throws KettleException { if ( m_schemaToUse != null ) { initTopLevelStructure( m_schemaToUse, true ); if ( m_normalFields == null || m_normalFields.size() == 0 ) { m_normalFields = getLeafFields( m_schemaToUse ); } } if ( m_normalFields == null || m_normalFields.size() == 0 ) { throw new KettleException( BaseMessages.getString( AvroInputMeta.PKG, "AvroInput.Error.NoFieldPathsDefined" ) ); } m_expansionHandler = checkFieldPaths( m_normalFields, m_outputRowMeta ); for ( AvroInputMeta.AvroField f : m_normalFields ) { int outputIndex = m_outputRowMeta.indexOfValue( f.m_fieldName ); f.init( outputIndex ); } if ( m_expansionHandler != null ) { m_expansionHandler.init(); } }  }
AvroInputData extends BaseStepData implements StepDataInterface { protected void init() throws KettleException { if ( m_schemaToUse != null ) { initTopLevelStructure( m_schemaToUse, true ); if ( m_normalFields == null || m_normalFields.size() == 0 ) { m_normalFields = getLeafFields( m_schemaToUse ); } } if ( m_normalFields == null || m_normalFields.size() == 0 ) { throw new KettleException( BaseMessages.getString( AvroInputMeta.PKG, "AvroInput.Error.NoFieldPathsDefined" ) ); } m_expansionHandler = checkFieldPaths( m_normalFields, m_outputRowMeta ); for ( AvroInputMeta.AvroField f : m_normalFields ) { int outputIndex = m_outputRowMeta.indexOfValue( f.m_fieldName ); f.init( outputIndex ); } if ( m_expansionHandler != null ) { m_expansionHandler.init(); } }  static String cleansePath( String path ); RowMetaInterface getOutputRowMeta(); void setOutputRowMeta( RowMetaInterface rmi ); void initializeFromFieldDecoding( String fieldNameToDecode, String readerSchemaFile,
      List<AvroInputMeta.AvroField> fields, boolean jsonEncoded, int newFieldOffset, boolean schemaInField,
      String schemaFieldName, boolean schemaFieldIsPath, boolean cacheSchemas, boolean ignoreMissing,
      LogChannelInterface log ); void establishFileType( FileObject avroFile, String readerSchemaFile, List<AvroInputMeta.AvroField> fields,
      boolean jsonEncoded, int newFieldOffset, boolean ignoreMissing, LogChannelInterface log ); Object[][] avroObjectToKettle( Object[] incoming, VariableSpace space ); void close(); }
AvroInputData extends BaseStepData implements StepDataInterface { protected void init() throws KettleException { if ( m_schemaToUse != null ) { initTopLevelStructure( m_schemaToUse, true ); if ( m_normalFields == null || m_normalFields.size() == 0 ) { m_normalFields = getLeafFields( m_schemaToUse ); } } if ( m_normalFields == null || m_normalFields.size() == 0 ) { throw new KettleException( BaseMessages.getString( AvroInputMeta.PKG, "AvroInput.Error.NoFieldPathsDefined" ) ); } m_expansionHandler = checkFieldPaths( m_normalFields, m_outputRowMeta ); for ( AvroInputMeta.AvroField f : m_normalFields ) { int outputIndex = m_outputRowMeta.indexOfValue( f.m_fieldName ); f.init( outputIndex ); } if ( m_expansionHandler != null ) { m_expansionHandler.init(); } }  static String cleansePath( String path ); RowMetaInterface getOutputRowMeta(); void setOutputRowMeta( RowMetaInterface rmi ); void initializeFromFieldDecoding( String fieldNameToDecode, String readerSchemaFile,
      List<AvroInputMeta.AvroField> fields, boolean jsonEncoded, int newFieldOffset, boolean schemaInField,
      String schemaFieldName, boolean schemaFieldIsPath, boolean cacheSchemas, boolean ignoreMissing,
      LogChannelInterface log ); void establishFileType( FileObject avroFile, String readerSchemaFile, List<AvroInputMeta.AvroField> fields,
      boolean jsonEncoded, int newFieldOffset, boolean ignoreMissing, LogChannelInterface log ); Object[][] avroObjectToKettle( Object[] incoming, VariableSpace space ); void close();  }