private void startKafka() { _zookeeperInstance = ZkStarter.startLocalZkServer(); _kafkaStarter = KafkaStarterUtils .startServer(KafkaStarterUtils.DEFAULT_KAFKA_PORT, KafkaStarterUtils.DEFAULT_BROKER_ID, KafkaStarterUtils.DEFAULT_ZK_STR, KafkaStarterUtils.getDefaultKafkaConfiguration()); KafkaStarterUtils.createTopic("airlineStatsEvents", KafkaStarterUtils.DEFAULT_ZK_STR, 10); }
protected RealtimeIndexOffHeapMemoryManager(ServerMetrics serverMetrics, String segmentName) { _serverMetrics = serverMetrics; _segmentName = segmentName; if (SegmentName.isLowLevelConsumerSegmentName(segmentName)) { LLCSegmentName llcSegmentName = new LLCSegmentName(segmentName); _tableName = llcSegmentName.getTableName(); } else if (SegmentName.isHighLevelConsumerSegmentName(segmentName)) { HLCSegmentName hlcSegmentName = new HLCSegmentName(segmentName); _tableName = hlcSegmentName.getTableName(); } else { // For testing only _tableName = "NoSuchTable"; } }
/** * Retrieve the partition Id from the segment name of the realtime segment * * @param segmentName the name of the realtime segment * @return partition id of the segment */ private int getPartitionId(String segmentName) { final LLCSegmentName llcSegmentName = new LLCSegmentName(segmentName); return llcSegmentName.getPartitionId(); } }
@Override public boolean equals(Object o) { if (EqualityUtils.isSameReference(this, o)) { return true; } if (EqualityUtils.isNullOrNotSameClass(this, o)) { return false; } DateTimeFormatUnitSpec that = (DateTimeFormatUnitSpec) o; return EqualityUtils.isEqual(_timeUnit, that._timeUnit) && EqualityUtils .isEqual(_dateTimeTransformUnit, that._dateTimeTransformUnit); }
@Override public Integer call() throws Exception { return fileUploadDownloadClient .sendSegmentUri(FileUploadDownloadClient.getUploadSegmentHttpURI(LOCAL_HOST, _controllerPort), downloadUri, httpHeaders, null, 60 * 1000).getStatusCode(); } }));
@Override public Integer call() throws Exception { return fileUploadDownloadClient.uploadSegment(uploadSegmentHttpURI, segmentName, segmentFile) .getStatusCode(); } }));
@Override public String toString() { return "{" + _segmentName.getSegmentName() + "," + _state + "," + _startTimeMs + "," + _winner + "," + _winningOffset + "," + _isSplitCommitEnabled + "," + _controllerVipUrl + "}"; }
/** * Returns the JSON equivalent of the object. * * @return JSON string equivalent of the object. * @throws IOException */ public String toJsonString() throws IOException { return JsonUtils.objectToString(this); }
@Override public int hashCode() { int result = EqualityUtils.hashCodeOf(_timeUnit); result = EqualityUtils.hashCodeOf(result, _dateTimeTransformUnit); return result; } }
@Override public String toString() { return getSegmentName(); } }
public String toJsonString() throws JsonProcessingException { return JsonUtils.objectToPrettyString(this); } }
protected void stopZk() { try { ZkStarter.stopLocalZkServer(_zookeeperInstance); } catch (Exception e) { // Swallow exceptions } }
@Override public void checkPermission(Permission perm, Object context) { checkPermission(perm); } });
@Override public boolean equals(Object o) { if (EqualityUtils.isSameReference(this, o)) { return true; } if (EqualityUtils.isNullOrNotSameClass(this, o)) { return false; } RoutingConfig that = (RoutingConfig) o; return EqualityUtils.isEqual(_routingTableBuilderName, that._routingTableBuilderName) && EqualityUtils .isEqual(_routingTableBuilderOptions, that._routingTableBuilderOptions); }
@Override public int hashCode() { int result = EqualityUtils.hashCodeOf(broker); result = EqualityUtils.hashCodeOf(result, server); return result; } }
@Override public int hashCode() { int hashCode = EqualityUtils.hashCodeOf(_functionName); hashCode = EqualityUtils.hashCodeOf(hashCode, _numPartitions); return hashCode; }
@Override public int hashCode() { int result = EqualityUtils.hashCodeOf(_taskType); result = EqualityUtils.hashCodeOf(result, _configs); return result; }
@Override public int hashCode() { int result = EqualityUtils.hashCodeOf(_partitionColumn); result = EqualityUtils.hashCodeOf(result, _numInstancesPerPartition); result = EqualityUtils.hashCodeOf(result, _mirrorAssignmentAcrossReplicaGroups); return result; } }
@Override public int hashCode() { int result = EqualityUtils.hashCodeOf(_timeFormat); result = EqualityUtils.hashCodeOf(result, _sdfPattern); result = EqualityUtils.hashCodeOf(result, _dateTimeZone); return result; }
@Override public int hashCode() { int result = EqualityUtils.hashCodeOf(_format); result = EqualityUtils.hashCodeOf(result, _size); result = EqualityUtils.hashCodeOf(result, _unitSpec); result = EqualityUtils.hashCodeOf(result, _patternSpec); return result; }