当前位置: 首页>>代码示例>>Java>>正文


Java WriterPoolSettings类代码示例

本文整理汇总了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());

}
 
开发者ID:OpenSourceMasters,项目名称:hbase-writer,代码行数:35,代码来源:HBaseWriter.java

示例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);
}
 
开发者ID:iipc,项目名称:webarchive-commons,代码行数:11,代码来源:ARCWriterPoolTest.java

示例3: CorruptibleARCWriter

import org.archive.io.WriterPoolSettings; //导入依赖的package包/类
public CorruptibleARCWriter(AtomicInteger serial_no, WriterPoolSettings settings) {
    super(serial_no, settings);
}
 
开发者ID:iipc,项目名称:webarchive-commons,代码行数:4,代码来源:ARCWriterTest.java

示例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());
}
 
开发者ID:iipc,项目名称:webarchive-commons,代码行数:21,代码来源:ARCWriter.java

示例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;
}
 
开发者ID:OpenSourceMasters,项目名称:hbase-writer,代码行数:19,代码来源:HBaseWriterPool.java

示例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);
}
 
开发者ID:iipc,项目名称:webarchive-commons,代码行数:12,代码来源:ARCWriterPool.java


注:本文中的org.archive.io.WriterPoolSettings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。