use of com.linkedin.pinot.common.restlet.resources.TableSizeInfo in project pinot by linkedin.
the class TableSizeResourceTest method testTableSizeNoDetails.
@Test
public void testTableSizeNoDetails() {
TableSizeInfo tableSizeInfo = target.path(TABLE_SIZE_PATH).queryParam("detailed", "false").request().get(TableSizeInfo.class);
Assert.assertEquals(tableSizeInfo.tableName, TABLE_NAME);
Assert.assertEquals(tableSizeInfo.diskSizeInBytes, testHelper.indexSegment.getDiskSizeBytes());
Assert.assertEquals(tableSizeInfo.segments.size(), 0);
}
use of com.linkedin.pinot.common.restlet.resources.TableSizeInfo in project pinot by linkedin.
the class TableSizeResourceTest method testTableSizeOld.
@Test
public void testTableSizeOld() {
TableSizeInfo tableSizeInfo = target.path("/table/" + TABLE_NAME + "/size").request().get(TableSizeInfo.class);
Assert.assertEquals(tableSizeInfo.tableName, TABLE_NAME);
IndexSegment indexSegment = testHelper.indexSegment;
Assert.assertEquals(tableSizeInfo.diskSizeInBytes, indexSegment.getDiskSizeBytes());
Assert.assertEquals(tableSizeInfo.segments.size(), 1);
Assert.assertEquals(tableSizeInfo.segments.get(0).segmentName, indexSegment.getSegmentName());
Assert.assertEquals(tableSizeInfo.segments.get(0).diskSizeInBytes, indexSegment.getDiskSizeBytes());
Assert.assertEquals(tableSizeInfo.diskSizeInBytes, indexSegment.getDiskSizeBytes());
}
Aggregations