Package org.apache.storm.hdfs.bolt.format

Examples of org.apache.storm.hdfs.bolt.format.DefaultFileNameFormat


        SyncPolicy syncPolicy = new CountSyncPolicy(1000);

        // rotate files when they reach 5MB
        FileRotationPolicy rotationPolicy = new TimedRotationPolicy(1.0f, TimedRotationPolicy.TimeUnit.MINUTES);

        FileNameFormat fileNameFormat = new DefaultFileNameFormat()
                .withPath("/foo/")
                .withExtension(".txt");


View Full Code Here


    builder.setBolt("karma-generate-json", new KarmaBolt(basicKarmaBoltProperties)).shuffleGrouping("karma-seq-spout");
    SequenceFileBolt sequenceFileBolt = new SequenceFileBolt();
   
    KarmaSequenceFormat sequenceFormat = new KarmaSequenceFormat("id", "json");
    sequenceFileBolt.withSequenceFormat(sequenceFormat);
    DefaultFileNameFormat fileNameFormat = new DefaultFileNameFormat();
    fileNameFormat.withExtension(".seq");
    fileNameFormat.withPath("/tmp/storm");
    fileNameFormat.withPrefix("karma");
    sequenceFileBolt.withFileNameFormat(fileNameFormat);
    sequenceFileBolt.withFsUrl("file:///");
    sequenceFileBolt.withSyncPolicy(new CountSyncPolicy(1));
    sequenceFileBolt.withRotationPolicy(new FileSizeRotationPolicy(1, Units.KB));
    Set<String> sources = new HashSet<String>();
View Full Code Here

TOP

Related Classes of org.apache.storm.hdfs.bolt.format.DefaultFileNameFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.