|
@@ -54,8 +54,8 @@ import org.apache.hadoop.yarn.server.timelineservice.storage.HBaseTimelineWriter
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.TimelineSchemaCreator;
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.TimelineSchemaCreator;
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.common.BaseTable;
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.common.BaseTable;
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnHelper;
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnHelper;
|
|
|
|
+import org.apache.hadoop.yarn.server.timelineservice.storage.common.HBaseTimelineStorageUtils;
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.common.LongConverter;
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.common.LongConverter;
|
|
-import org.apache.hadoop.yarn.server.timelineservice.storage.common.TimelineStorageUtils;
|
|
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.common.TimestampGenerator;
|
|
import org.apache.hadoop.yarn.server.timelineservice.storage.common.TimestampGenerator;
|
|
import org.junit.AfterClass;
|
|
import org.junit.AfterClass;
|
|
import org.junit.Assert;
|
|
import org.junit.Assert;
|
|
@@ -416,8 +416,8 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
tags.add(t);
|
|
tags.add(t);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
// create a cell with a VERY old timestamp and attribute SUM_FINAL
|
|
// create a cell with a VERY old timestamp and attribute SUM_FINAL
|
|
- Cell c1 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
- cell1Ts, Bytes.toBytes(cellValue1), tagByteArray);
|
|
|
|
|
|
+ Cell c1 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily,
|
|
|
|
+ aQualifier, cell1Ts, Bytes.toBytes(cellValue1), tagByteArray);
|
|
currentColumnCells.add(c1);
|
|
currentColumnCells.add(c1);
|
|
|
|
|
|
tags = new ArrayList<>();
|
|
tags = new ArrayList<>();
|
|
@@ -426,8 +426,8 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
tags.add(t);
|
|
tags.add(t);
|
|
tagByteArray = Tag.fromList(tags);
|
|
tagByteArray = Tag.fromList(tags);
|
|
// create a cell with a recent timestamp and attribute SUM_FINAL
|
|
// create a cell with a recent timestamp and attribute SUM_FINAL
|
|
- Cell c2 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
- cell2Ts, Bytes.toBytes(cellValue2), tagByteArray);
|
|
|
|
|
|
+ Cell c2 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily,
|
|
|
|
+ aQualifier, cell2Ts, Bytes.toBytes(cellValue2), tagByteArray);
|
|
currentColumnCells.add(c2);
|
|
currentColumnCells.add(c2);
|
|
|
|
|
|
tags = new ArrayList<>();
|
|
tags = new ArrayList<>();
|
|
@@ -436,8 +436,8 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
tags.add(t);
|
|
tags.add(t);
|
|
tagByteArray = Tag.fromList(tags);
|
|
tagByteArray = Tag.fromList(tags);
|
|
// create a cell with a VERY old timestamp but has attribute SUM
|
|
// create a cell with a VERY old timestamp but has attribute SUM
|
|
- Cell c3 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
- cell3Ts, Bytes.toBytes(cellValue3), tagByteArray);
|
|
|
|
|
|
+ Cell c3 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily,
|
|
|
|
+ aQualifier, cell3Ts, Bytes.toBytes(cellValue3), tagByteArray);
|
|
currentColumnCells.add(c3);
|
|
currentColumnCells.add(c3);
|
|
|
|
|
|
tags = new ArrayList<>();
|
|
tags = new ArrayList<>();
|
|
@@ -446,8 +446,8 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
tags.add(t);
|
|
tags.add(t);
|
|
tagByteArray = Tag.fromList(tags);
|
|
tagByteArray = Tag.fromList(tags);
|
|
// create a cell with a VERY old timestamp but has attribute SUM
|
|
// create a cell with a VERY old timestamp but has attribute SUM
|
|
- Cell c4 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
- cell4Ts, Bytes.toBytes(cellValue4), tagByteArray);
|
|
|
|
|
|
+ Cell c4 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily,
|
|
|
|
+ aQualifier, cell4Ts, Bytes.toBytes(cellValue4), tagByteArray);
|
|
currentColumnCells.add(c4);
|
|
currentColumnCells.add(c4);
|
|
|
|
|
|
List<Cell> cells =
|
|
List<Cell> cells =
|
|
@@ -516,7 +516,7 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
tags.add(t);
|
|
tags.add(t);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
// create a cell with a VERY old timestamp and attribute SUM_FINAL
|
|
// create a cell with a VERY old timestamp and attribute SUM_FINAL
|
|
- c1 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
|
|
+ c1 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
cellTsFinal, Bytes.toBytes(cellValueFinal), tagByteArray);
|
|
cellTsFinal, Bytes.toBytes(cellValueFinal), tagByteArray);
|
|
currentColumnCells.add(c1);
|
|
currentColumnCells.add(c1);
|
|
cellTsFinal++;
|
|
cellTsFinal++;
|
|
@@ -530,7 +530,7 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
tags.add(t);
|
|
tags.add(t);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
// create a cell with attribute SUM
|
|
// create a cell with attribute SUM
|
|
- c1 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
|
|
+ c1 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
cellTsNotFinal, Bytes.toBytes(cellValueNotFinal), tagByteArray);
|
|
cellTsNotFinal, Bytes.toBytes(cellValueNotFinal), tagByteArray);
|
|
currentColumnCells.add(c1);
|
|
currentColumnCells.add(c1);
|
|
cellTsNotFinal++;
|
|
cellTsNotFinal++;
|
|
@@ -607,7 +607,7 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
tags.add(t);
|
|
tags.add(t);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
// create a cell with a VERY old timestamp and attribute SUM_FINAL
|
|
// create a cell with a VERY old timestamp and attribute SUM_FINAL
|
|
- c1 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
|
|
+ c1 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
cellTsFinal, Bytes.toBytes(cellValueFinal), tagByteArray);
|
|
cellTsFinal, Bytes.toBytes(cellValueFinal), tagByteArray);
|
|
currentColumnCells.add(c1);
|
|
currentColumnCells.add(c1);
|
|
cellTsFinal++;
|
|
cellTsFinal++;
|
|
@@ -621,7 +621,7 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
tags.add(t);
|
|
tags.add(t);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
// create a cell with a VERY old timestamp and attribute SUM_FINAL
|
|
// create a cell with a VERY old timestamp and attribute SUM_FINAL
|
|
- c1 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
|
|
+ c1 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
cellTsFinalNotExpire, Bytes.toBytes(cellValueFinal), tagByteArray);
|
|
cellTsFinalNotExpire, Bytes.toBytes(cellValueFinal), tagByteArray);
|
|
currentColumnCells.add(c1);
|
|
currentColumnCells.add(c1);
|
|
cellTsFinalNotExpire++;
|
|
cellTsFinalNotExpire++;
|
|
@@ -635,7 +635,7 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
tags.add(t);
|
|
tags.add(t);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
byte[] tagByteArray = Tag.fromList(tags);
|
|
// create a cell with attribute SUM
|
|
// create a cell with attribute SUM
|
|
- c1 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
|
|
+ c1 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
cellTsNotFinal, Bytes.toBytes(cellValueNotFinal), tagByteArray);
|
|
cellTsNotFinal, Bytes.toBytes(cellValueNotFinal), tagByteArray);
|
|
currentColumnCells.add(c1);
|
|
currentColumnCells.add(c1);
|
|
cellTsNotFinal++;
|
|
cellTsNotFinal++;
|
|
@@ -692,8 +692,8 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
SortedSet<Cell> currentColumnCells = new TreeSet<Cell>(KeyValue.COMPARATOR);
|
|
SortedSet<Cell> currentColumnCells = new TreeSet<Cell>(KeyValue.COMPARATOR);
|
|
|
|
|
|
// create a cell with a VERY old timestamp and attribute SUM_FINAL
|
|
// create a cell with a VERY old timestamp and attribute SUM_FINAL
|
|
- Cell c1 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
- 120L, Bytes.toBytes(cellValue1), tagByteArray);
|
|
|
|
|
|
+ Cell c1 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily,
|
|
|
|
+ aQualifier, 120L, Bytes.toBytes(cellValue1), tagByteArray);
|
|
currentColumnCells.add(c1);
|
|
currentColumnCells.add(c1);
|
|
|
|
|
|
tags = new ArrayList<>();
|
|
tags = new ArrayList<>();
|
|
@@ -703,8 +703,8 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
tagByteArray = Tag.fromList(tags);
|
|
tagByteArray = Tag.fromList(tags);
|
|
|
|
|
|
// create a cell with a VERY old timestamp but has attribute SUM
|
|
// create a cell with a VERY old timestamp but has attribute SUM
|
|
- Cell c2 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
- 130L, Bytes.toBytes(cellValue2), tagByteArray);
|
|
|
|
|
|
+ Cell c2 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily,
|
|
|
|
+ aQualifier, 130L, Bytes.toBytes(cellValue2), tagByteArray);
|
|
currentColumnCells.add(c2);
|
|
currentColumnCells.add(c2);
|
|
List<Cell> cells = fs.processSummationMajorCompaction(currentColumnCells,
|
|
List<Cell> cells = fs.processSummationMajorCompaction(currentColumnCells,
|
|
new LongConverter(), currentTimestamp);
|
|
new LongConverter(), currentTimestamp);
|
|
@@ -750,8 +750,8 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
SortedSet<Cell> currentColumnCells = new TreeSet<Cell>(KeyValue.COMPARATOR);
|
|
SortedSet<Cell> currentColumnCells = new TreeSet<Cell>(KeyValue.COMPARATOR);
|
|
|
|
|
|
// create a cell with a VERY old timestamp
|
|
// create a cell with a VERY old timestamp
|
|
- Cell c1 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
- 120L, Bytes.toBytes(1110L), tagByteArray);
|
|
|
|
|
|
+ Cell c1 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily,
|
|
|
|
+ aQualifier, 120L, Bytes.toBytes(1110L), tagByteArray);
|
|
currentColumnCells.add(c1);
|
|
currentColumnCells.add(c1);
|
|
|
|
|
|
List<Cell> cells = fs.processSummationMajorCompaction(currentColumnCells,
|
|
List<Cell> cells = fs.processSummationMajorCompaction(currentColumnCells,
|
|
@@ -788,8 +788,8 @@ public class TestHBaseStorageFlowRunCompaction {
|
|
|
|
|
|
SortedSet<Cell> currentColumnCells = new TreeSet<Cell>(KeyValue.COMPARATOR);
|
|
SortedSet<Cell> currentColumnCells = new TreeSet<Cell>(KeyValue.COMPARATOR);
|
|
|
|
|
|
- Cell c1 = TimelineStorageUtils.createNewCell(aRowKey, aFamily, aQualifier,
|
|
|
|
- currentTimestamp, Bytes.toBytes(1110L), tagByteArray);
|
|
|
|
|
|
+ Cell c1 = HBaseTimelineStorageUtils.createNewCell(aRowKey, aFamily,
|
|
|
|
+ aQualifier, currentTimestamp, Bytes.toBytes(1110L), tagByteArray);
|
|
currentColumnCells.add(c1);
|
|
currentColumnCells.add(c1);
|
|
List<Cell> cells = fs.processSummationMajorCompaction(currentColumnCells,
|
|
List<Cell> cells = fs.processSummationMajorCompaction(currentColumnCells,
|
|
new LongConverter(), currentTimestamp);
|
|
new LongConverter(), currentTimestamp);
|