jline.internal.Log Java Examples

The following examples show how to use jline.internal.Log. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IngestWorker.java    From datawave with Apache License 2.0 6 votes vote down vote up
@Override
public Void call() throws InterruptedException {
    final IngestConfig cfg = IngestConfig.getInstance();
    final FileSystem fs = cfg.getHdfs();
    final Path dst = new Path(cfg.getHdfsIngestDir());
    final long endTime = cfg.getDurtion() + System.currentTimeMillis();
    logger.info("starting task thread(" + Thread.currentThread().getId() + ") duration(" + cfg.getDurtion() + ")ms");
    while (endTime >= System.currentTimeMillis()) {
        final List<Path> moveFiles = cfg.getRandomIngestFiles();
        Path[] srcFiles = new Path[moveFiles.size()];
        srcFiles = moveFiles.toArray(srcFiles);
        try {
            fs.copyFromLocalFile(false, false, srcFiles, dst);
        } catch (IOException ioe) {
            Log.error("thread(" + Thread.currentThread().getId() + ") unable to copy ingest files: " + ioe.getMessage());
        }
        final int waitDur = cfg.getRandomInterval();
        Thread.sleep(waitDur);
    }
    
    logger.info("task thread(" + Thread.currentThread().getId() + ") completed");
    return null;
}
 
Example #2
Source File: EvalExpandModel.java    From OpenModsLib with MIT License 6 votes vote down vote up
@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
	final IModel model = loadBaseModel(state, format, bakedTextureGetter);

	IBlockState blockState = null;

	if (defaultBlockState.isPresent()) {
		final Block defaultBlock = Block.REGISTRY.getObject(defaultBlockState.get());
		if (defaultBlock != Blocks.AIR) {
			blockState = defaultBlock.getDefaultState();
			if (!(blockState instanceof IExtendedBlockState) ||
					!((IExtendedBlockState)blockState).getUnlistedNames().contains(EvalModelState.PROPERTY)) {
				Log.warn("State %s does not contain eval state property", blockState);
			}
		} else {
			Log.warn("Can't find default block: %s", defaultBlockState.get());
		}
	}

	final IVarExpander expander = evaluatorFactory.createExpander();
	return new BakedEvalExpandModel(model, state, format, bakedTextureGetter, blockState, expander);
}
 
Example #3
Source File: OsgiEmbeddedCassandra.java    From Karaf-Cassandra with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isRunning() {
    if (runner == null)
        return false;
    
    try {
        return CassandraRunner.waitForPortOpen(InetAddress.getByName("localhost"), Integer.parseInt(default_native_transport_port), 2000);
    } catch (UnknownHostException e) {
        Log.error("Cassandra failed to start: ", e);
        return false;
    }
}
 
Example #4
Source File: ContainerBucketFillHandler.java    From OpenModsLib with MIT License 5 votes vote down vote up
public ContainerBucketFillHandler addFilledBucket(ItemStack filledBucket) {
	FluidStack containedFluid = FluidUtil.getFluidContained(filledBucket);
	if (containedFluid != null) {
		buckets.add(Pair.of(containedFluid.copy(), filledBucket.copy()));
	} else {
		Log.warn("Item %s is not a filled bucket", filledBucket);
	}
	return this;
}