Search in sources :

Example 6 with TableSizeInfo

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);
}
Also used : TableSizeInfo(com.linkedin.pinot.common.restlet.resources.TableSizeInfo) Test(org.testng.annotations.Test) AfterTest(org.testng.annotations.AfterTest)

Example 7 with TableSizeInfo

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());
}
Also used : IndexSegment(com.linkedin.pinot.core.indexsegment.IndexSegment) TableSizeInfo(com.linkedin.pinot.common.restlet.resources.TableSizeInfo) Test(org.testng.annotations.Test) AfterTest(org.testng.annotations.AfterTest)

Aggregations

TableSizeInfo (com.linkedin.pinot.common.restlet.resources.TableSizeInfo)7 SegmentSizeInfo (com.linkedin.pinot.common.restlet.resources.SegmentSizeInfo)3 IndexSegment (com.linkedin.pinot.core.indexsegment.IndexSegment)3 AfterTest (org.testng.annotations.AfterTest)3 Test (org.testng.annotations.Test)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 MultiGetRequest (com.linkedin.pinot.common.http.MultiGetRequest)1 InstanceDataManager (com.linkedin.pinot.core.data.manager.offline.InstanceDataManager)1 SegmentDataManager (com.linkedin.pinot.core.data.manager.offline.SegmentDataManager)1 TableDataManager (com.linkedin.pinot.core.data.manager.offline.TableDataManager)1 HttpExchange (com.sun.net.httpserver.HttpExchange)1 HttpHandler (com.sun.net.httpserver.HttpHandler)1 ApiOperation (io.swagger.annotations.ApiOperation)1 ApiResponses (io.swagger.annotations.ApiResponses)1 OutputStream (java.io.OutputStream)1 SocketTimeoutException (java.net.SocketTimeoutException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 ExecutionException (java.util.concurrent.ExecutionException)1