@Override
  public Extractor<S, D> getExtractor(WorkUnitState state) throws IOException {
    Preconditions.checkNotNull(state, "WorkUnitState should not be null");
    LOG.info("WorkUnitState from getExtractor: " + state);

    try {
      //GoogleDriveExtractor needs GoogleDriveFsHelper
      initFileSystemHelper(state);
    } catch (FileBasedHelperException e) {
      throw new IOException(e);
    }

    Preconditions.checkNotNull(fsHelper, "File system helper should not be null");
    return new GoogleDriveExtractor<>(state, fsHelper);
  }
@ Override public Extractor < S , D > getExtractor ( WorkUnitState state ) throws IOException { Preconditions . checkNotNull ( state , "WorkUnitState should not be null" ) ; LOG . info ( "WorkUnitState from getExtractor: " + state ) ; try { initFileSystemHelper ( state ) ; } catch ( FileBasedHelperException e ) { throw new IOException ( e ) ; } Preconditions . checkNotNull ( fsHelper , "File system helper should not be null" ) ; return new GoogleDriveExtractor < > ( state , fsHelper ) ; }
As Google Drive extractor needs file system helper, it invokes to initialize file system helper.
{@inheritDoc}
@see org.apache.gobblin.source.Source#getExtractor(org.apache.gobblin.configuration.WorkUnitState)