Codota Logo
HdfsSpout.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.apache.storm.hdfs.spout.HdfsSpout
constructor

Best Java code snippets using org.apache.storm.hdfs.spout.HdfsSpout.<init> (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

HdfsSpout spout = new HdfsSpout().withOutputFields(TextFileReader.defaultFields)
                 .setReaderType(fileFormat)
                 .setHdfsUri(hdfsUri)
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.spoutHdfsSpout<init>

Popular methods of HdfsSpout

  • setArchiveDir
  • setBadFilesDir
  • 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

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Socket (java.net)
    Provides a client-side TCP socket.
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
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