Codota Logo
HdfsSpout.setBadFilesDir
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
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

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now