本文整理汇总了Java中org.archive.io.WriterPoolSettings类的典型用法代码示例。如果您正苦于以下问题:Java WriterPoolSettings类的具体用法?Java WriterPoolSettings怎么用?Java WriterPoolSettings使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WriterPoolSettings类属于org.archive.io包,在下文中一共展示了WriterPoolSettings类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: HBaseWriter
import org.archive.io.WriterPoolSettings; //导入依赖的package包/类
/**
* Instantiates a new h base writer.
*
* @param serialNo
* the serial no
* @param settings
* the settings
* @param parameters
* the parameters
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public HBaseWriter(AtomicInteger serialNo, final WriterPoolSettings settings, HBaseParameters parameters) throws IOException {
// Instantiates a new HBaseWriter for the WriterPool to use in heritrix.
super(serialNo, settings, null);
Preconditions.checkArgument(parameters != null);
this.hbaseParameters = parameters;
Configuration hbaseConfiguration = HBaseConfiguration.create();
// set the zk quorum list
log.info("setting zookeeper quorum to : " + hbaseParameters.getZkQuorum());
hbaseConfiguration.setStrings(HConstants.ZOOKEEPER_QUORUM, hbaseParameters.getZkQuorum().split(","));
// set the client port
log.info("setting zookeeper client Port to : " + hbaseParameters.getZkPort());
hbaseConfiguration.setInt(getHbaseParameters().getZookeeperClientPortKey(), hbaseParameters.getZkPort());
// create a crawl table
initializeCrawlTable(hbaseConfiguration, hbaseParameters.getHbaseTableName());
this.hTable = new HTable(hbaseConfiguration, hbaseParameters.getHbaseTableName());
}
示例2: getSettings
import org.archive.io.WriterPoolSettings; //导入依赖的package包/类
private WriterPoolSettings getSettings(final boolean isCompressed) {
File [] files = {getTmpDir()};
return new WriterPoolSettingsData(
PREFIX,
"${prefix}-${timestamp17}-${serialno}-${heritrix.hostname}",
ARCConstants.DEFAULT_MAX_ARC_FILE_SIZE,
isCompressed,
Arrays.asList(files),
null);
}
示例3: CorruptibleARCWriter
import org.archive.io.WriterPoolSettings; //导入依赖的package包/类
public CorruptibleARCWriter(AtomicInteger serial_no, WriterPoolSettings settings) {
super(serial_no, settings);
}
示例4: ARCWriter
import org.archive.io.WriterPoolSettings; //导入依赖的package包/类
/**
* Constructor.
* Takes a stream. Use with caution. There is no upperbound check on size.
* Will just keep writing.
*
* @param serialNo used to generate unique file name sequences
* @param out Where to write.
* @param arc File the <code>out</code> is connected to.
* @param cmprs Compress the content written.
* @param metadata File meta data. Can be null. Is list of File and/or
* String objects.
* @param a14DigitDate If null, we'll write current time.
* @throws IOException
*/
public ARCWriter(final AtomicInteger serialNo, final PrintStream out,
final File arc, final WriterPoolSettings settings)
throws IOException {
super(serialNo, out, arc, settings);
writeFirstRecord(ArchiveUtils.get14DigitDate());
}
示例5: HBaseWriterPool
import org.archive.io.WriterPoolSettings; //导入依赖的package包/类
/**
* Instantiates a new HBase writer pool.
*
* @param serial
* the serial
* @param settings
* the settings
* @param poolMaximumActive
* the pool maximum active
* @param poolMaximumWait
* the pool maximum wait
* @param parameters
* the parameters
*/
public HBaseWriterPool(AtomicInteger serial, WriterPoolSettings settings, int poolMaximumActive, int poolMaximumWait, HBaseParameters parameters) {
super(serial, settings, poolMaximumActive, poolMaximumWait);
this.hbaseParameters = parameters;
}
示例6: ARCWriterPool
import org.archive.io.WriterPoolSettings; //导入依赖的package包/类
/**
* Constructor
*
* @param settings Settings for this pool.
* @param poolMaximumActive
* @param poolMaximumWait
*/
public ARCWriterPool(final WriterPoolSettings settings,
final int poolMaximumActive, final int poolMaximumWait) {
this(new AtomicInteger(), settings, poolMaximumActive, poolMaximumWait);
}