Tabnine Logo
FileBasedHelperException.getMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
getMessage
method
in
org.apache.gobblin.source.extractor.filebased.FileBasedHelperException

Best Java code snippets using org.apache.gobblin.source.extractor.filebased.FileBasedHelperException.getMessage (Showing top 8 results out of 315)

origin: apache/incubator-gobblin

 private void incrementBytesReadCounter() {
  try {
   this.counters.inc(CounterNames.FileBytesRead, this.fsHelper.getFileSize(this.currentFile));
  } catch (FileBasedHelperException e) {
   LOG.info("Unable to get file size. Will skip increment to bytes counter " + e.getMessage());
   LOG.debug(e.getMessage(), e);
  } catch (UnsupportedOperationException e) {
   LOG.info("Unable to get file size. Will skip increment to bytes counter " + e.getMessage());
   LOG.debug(e.getMessage(), e);
  }
 }
}
origin: apache/incubator-gobblin

 @Override
 public List<String> getcurrentFsSnapshot(State state) {
  List<String> results = Lists.newArrayList();
  String path = state.getProp(ConfigurationKeys.SOURCE_FILEBASED_DATA_DIRECTORY);

  try {
   LOGGER.info("Running ls command with input " + path);
   results = this.fsHelper.ls(path);
  } catch (FileBasedHelperException e) {
   LOGGER.error("Not able to run ls command due to " + e.getMessage() + " will not pull any files", e);
  }
  return results;
 }
}
origin: apache/incubator-gobblin

 @SuppressWarnings("unchecked")
 public Iterator<D> downloadFile(String file) throws IOException {

  log.info("Beginning to download gzip compressed file: " + file);

  try {
   InputStream inputStream =
     this.fileBasedExtractor.getCloser().register(this.fileBasedExtractor.getFsHelper().getFileStream(file));
   Iterator<D> fileItr = (Iterator<D>) IOUtils.lineIterator(new GZIPInputStream(inputStream),
     ConfigurationKeys.DEFAULT_CHARSET_ENCODING);
   if (this.fileBasedExtractor.isShouldSkipFirstRecord() && fileItr.hasNext()) {
    fileItr.next();
   }
   return fileItr;
  } catch (FileBasedHelperException e) {
   throw new IOException("Exception while downloading file " + file + " with message " + e.getMessage(), e);
  }
 }
}
origin: apache/incubator-gobblin

 @SuppressWarnings("unchecked")
 public Iterator<D> downloadFile(String file) throws IOException {

  log.info("Beginning to download file: " + file);

  try {
   InputStream inputStream =
     this.fileBasedExtractor.getCloser().register(this.fileBasedExtractor.getFsHelper().getFileStream(file));
   Iterator<D> fileItr = (Iterator<D>) IOUtils.lineIterator(inputStream, ConfigurationKeys.DEFAULT_CHARSET_ENCODING);
   if (this.fileBasedExtractor.isShouldSkipFirstRecord() && fileItr.hasNext()) {
    fileItr.next();
   }
   return fileItr;
  } catch (FileBasedHelperException e) {
   throw new IOException("Exception while downloading file " + file + " with message " + e.getMessage(), e);
  }
 }
}
origin: org.apache.gobblin/gobblin-core

 private void incrementBytesReadCounter() {
  try {
   this.counters.inc(CounterNames.FileBytesRead, this.fsHelper.getFileSize(this.currentFile));
  } catch (FileBasedHelperException e) {
   LOG.info("Unable to get file size. Will skip increment to bytes counter " + e.getMessage());
   LOG.debug(e.getMessage(), e);
  } catch (UnsupportedOperationException e) {
   LOG.info("Unable to get file size. Will skip increment to bytes counter " + e.getMessage());
   LOG.debug(e.getMessage(), e);
  }
 }
}
origin: org.apache.gobblin/gobblin-core

 @Override
 public List<String> getcurrentFsSnapshot(State state) {
  List<String> results = Lists.newArrayList();
  String path = state.getProp(ConfigurationKeys.SOURCE_FILEBASED_DATA_DIRECTORY);

  try {
   LOGGER.info("Running ls command with input " + path);
   results = this.fsHelper.ls(path);
  } catch (FileBasedHelperException e) {
   LOGGER.error("Not able to run ls command due to " + e.getMessage() + " will not pull any files", e);
  }
  return results;
 }
}
origin: org.apache.gobblin/gobblin-core

 @SuppressWarnings("unchecked")
 public Iterator<D> downloadFile(String file) throws IOException {

  log.info("Beginning to download gzip compressed file: " + file);

  try {
   InputStream inputStream =
     this.fileBasedExtractor.getCloser().register(this.fileBasedExtractor.getFsHelper().getFileStream(file));
   Iterator<D> fileItr = (Iterator<D>) IOUtils.lineIterator(new GZIPInputStream(inputStream),
     ConfigurationKeys.DEFAULT_CHARSET_ENCODING);
   if (this.fileBasedExtractor.isShouldSkipFirstRecord() && fileItr.hasNext()) {
    fileItr.next();
   }
   return fileItr;
  } catch (FileBasedHelperException e) {
   throw new IOException("Exception while downloading file " + file + " with message " + e.getMessage(), e);
  }
 }
}
origin: org.apache.gobblin/gobblin-core

 @SuppressWarnings("unchecked")
 public Iterator<D> downloadFile(String file) throws IOException {

  log.info("Beginning to download file: " + file);

  try {
   InputStream inputStream =
     this.fileBasedExtractor.getCloser().register(this.fileBasedExtractor.getFsHelper().getFileStream(file));
   Iterator<D> fileItr = (Iterator<D>) IOUtils.lineIterator(inputStream, ConfigurationKeys.DEFAULT_CHARSET_ENCODING);
   if (this.fileBasedExtractor.isShouldSkipFirstRecord() && fileItr.hasNext()) {
    fileItr.next();
   }
   return fileItr;
  } catch (FileBasedHelperException e) {
   throw new IOException("Exception while downloading file " + file + " with message " + e.getMessage(), e);
  }
 }
}
org.apache.gobblin.source.extractor.filebasedFileBasedHelperExceptiongetMessage

Popular methods of FileBasedHelperException

  • <init>

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • Kernel (java.awt.image)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Notification (javax.management)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now