List of usage examples for org.apache.cassandra.config DatabaseDescriptor setStreamThroughputOutboundMegabitsPerSec
public static void setStreamThroughputOutboundMegabitsPerSec(int value)
From source file:com.spotify.hdfs2cass.cassandra.thrift.CrunchBulkRecordWriter.java
License:Apache License
public CrunchBulkRecordWriter(TaskAttemptContext context) { Config.setClientMode(true);//w ww .j a v a 2 s . co m Config.setOutboundBindAny(true); this.conf = HadoopCompat.getConfiguration(context); this.context = context; int megabitsPerSec = Integer.parseInt(conf.get(STREAM_THROTTLE_MBITS, "0")); DatabaseDescriptor.setStreamThroughputOutboundMegabitsPerSec(megabitsPerSec); heartbeat = new ProgressHeartbeat(context, 120); }
From source file:com.tuplejump.calliope.hadoop.BulkRecordWriter.java
License:Apache License
BulkRecordWriter(Configuration conf) { Config.setClientMode(true);/* w w w . j a v a 2 s . co m*/ Config.setOutboundBindAny(true); this.conf = conf; DatabaseDescriptor .setStreamThroughputOutboundMegabitsPerSec(Integer.parseInt(conf.get(STREAM_THROTTLE_MBITS, "0"))); maxFailures = Integer.parseInt(conf.get(MAX_FAILED_HOSTS, "0")); }
From source file:de.hpi.isg.mdms.hadoop.cassandra.AbstractBulkRecordWriter.java
License:Apache License
protected AbstractBulkRecordWriter(Configuration conf) { Config.setClientMode(true);/*from w w w . jav a 2s .com*/ Config.setOutboundBindAny(true); this.conf = conf; DatabaseDescriptor .setStreamThroughputOutboundMegabitsPerSec(Integer.parseInt(conf.get(STREAM_THROTTLE_MBITS, "0"))); maxFailures = Integer.parseInt(conf.get(MAX_FAILED_HOSTS, "0")); bufferSize = Integer.parseInt(conf.get(BUFFER_SIZE_IN_MB, "64")); }