Tabnine Logo
HdfsSpout.setBadFilesDir
Code IndexAdd Tabnine to your IDE (free)

How to use
setBadFilesDir
method
in
org.apache.storm.hdfs.spout.HdfsSpout

Best Java code snippets using org.apache.storm.hdfs.spout.HdfsSpout.setBadFilesDir (Showing top 3 results out of 315)

origin: apache/storm

.setSourceDir(sourceDir)
.setArchiveDir(archiveDir)
.setBadFilesDir(badDir);
origin: apache/storm

private AutoCloseableHdfsSpout makeSpout(String readerType, String[] outputFields) {
  HdfsSpout spout = new HdfsSpout().withOutputFields(outputFields)
                   .setReaderType(readerType)
                   .setHdfsUri(DFS_CLUSTER_RULE.getDfscluster().getURI().toString())
                   .setSourceDir(source.toString())
                   .setArchiveDir(archive.toString())
                   .setBadFilesDir(badfiles.toString());
  return new AutoCloseableHdfsSpout(spout);
}
origin: apache/storm

static StormTopology getTopology(Map<String, Object> config) {
  final int spoutNum = Helper.getInt(config, SPOUT_NUM, DEFAULT_SPOUT_NUM);
  final int boltNum = Helper.getInt(config, BOLT_NUM, DEFAULT_BOLT_NUM);
  final String fileFormat = Helper.getStr(config, "text");
  final String hdfsUri = Helper.getStr(config, HDFS_URI);
  final String sourceDir = Helper.getStr(config, SOURCE_DIR);
  final String archiveDir = Helper.getStr(config, ARCHIVE_DIR);
  final String badDir = Helper.getStr(config, BAD_DIR);
  // 1 -  Setup Hdfs Spout   --------
  HdfsSpout spout = new HdfsSpout()
    .setReaderType(fileFormat)
    .setHdfsUri(hdfsUri)
    .setSourceDir(sourceDir)
    .setArchiveDir(archiveDir)
    .setBadFilesDir(badDir)
    .withOutputFields(TextFileReader.defaultFields);
  // 2 -   DevNull Bolt   --------
  DevNullBolt bolt = new DevNullBolt();
  // 3 - Setup Topology  --------
  TopologyBuilder builder = new TopologyBuilder();
  builder.setSpout(SPOUT_ID, spout, spoutNum);
  builder.setBolt(BOLT_ID, bolt, boltNum)
      .localOrShuffleGrouping(SPOUT_ID);
  return builder.createTopology();
}
org.apache.storm.hdfs.spoutHdfsSpoutsetBadFilesDir

Popular methods of HdfsSpout

  • <init>
  • setArchiveDir
  • setHdfsUri
  • setReaderType
  • setSourceDir
  • withOutputFields
    Output field names. Number of fields depends upon the reader type
  • ack
  • canCommitNow
  • checkValidReader
  • close
  • closeReaderAndResetTrackers
  • commitProgress
  • closeReaderAndResetTrackers,
  • commitProgress,
  • createFileReader,
  • emitData,
  • fail,
  • getCollector,
  • getDefaultLockDir,
  • getFileForLockFile,
  • getFileProgress

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JButton (javax.swing)
  • Github Copilot 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