Skip to content

Commit

Permalink
Change the availabilitytype parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Jul 4, 2017
1 parent 02222bd commit dbddff7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.hawkular.metrics.core.service.compress.CompressedPointContainer;
import org.hawkular.metrics.core.service.compress.CompressorHeader;
import org.hawkular.metrics.core.service.compress.TagsSerializer;
import org.hawkular.metrics.model.AvailabilityType;

import com.datastax.driver.core.Row;

Expand Down Expand Up @@ -97,7 +98,8 @@ public Observable<CompressedPointContainer> call(Observable<Row> dataRow) {
break;
case 1: // AVAILABILITY
// TODO Update to GORILLA_V2 to fix these - no point storing as FP
compressor.addValue(timestamp, ((Byte) r.getByte(5)).doubleValue());
compressor.addValue(timestamp, ((Byte) (AvailabilityType.fromBytes(r.getBytes(5))
.getCode())).doubleValue());
break;
case 2: // COUNTER
// TODO Update to GORILLA_V2 to fix these - no point storing as FP
Expand Down

0 comments on commit dbddff7

Please sign in to comment.