Merge pull request #755 from peng-yongsheng/fixed/storage_bug

Missing change about boolean to integer.
This commit is contained in:
Xin,Zhang 2018-01-14 18:12:18 +08:00 committed by GitHub
commit b8d66bde59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -33,6 +33,7 @@ import org.apache.skywalking.apm.collector.cache.service.ServiceNameCacheService
import org.apache.skywalking.apm.collector.core.graph.Graph;
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
import org.apache.skywalking.apm.collector.core.util.BooleanUtils;
import org.apache.skywalking.apm.collector.core.util.TimeBucketUtils;
import org.apache.skywalking.apm.collector.storage.table.segment.SegmentCost;
import org.slf4j.Logger;
@ -98,7 +99,7 @@ public class SegmentCostSpanListener implements EntrySpanListener, ExitSpanListe
Graph<SegmentCost> graph = GraphManager.INSTANCE.findGraph(MetricGraphIdDefine.SEGMENT_COST_GRAPH_ID, SegmentCost.class);
logger.debug("segment cost listener build");
for (SegmentCost segmentCost : segmentCosts) {
segmentCost.setIsError(isError);
segmentCost.setIsError(BooleanUtils.booleanToValue(isError));
segmentCost.setTimeBucket(timeBucket);
graph.start(segmentCost);
}

View File

@ -22,7 +22,6 @@ import org.apache.skywalking.apm.collector.core.data.Column;
import org.apache.skywalking.apm.collector.core.data.StreamData;
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
import org.apache.skywalking.apm.collector.core.util.BooleanUtils;
/**
* @author peng-yongsheng
@ -127,11 +126,11 @@ public class SegmentCost extends StreamData {
setDataInteger(0, applicationId);
}
public Boolean getIsError() {
return BooleanUtils.valueToBoolean(getDataInteger(1));
public Integer getIsError() {
return getDataInteger(1);
}
public void setIsError(Boolean isError) {
setDataInteger(0, BooleanUtils.booleanToValue(isError));
public void setIsError(Integer isError) {
setDataInteger(1, isError);
}
}