private static List<Long> getAllComputeNodeIds() throws DdlException {
        SystemInfoService infoService = GlobalStateMgr.getCurrentState().getNodeMgr().getClusterInfo();
        List<Long> allComputeNodeIds = Lists.newArrayList();
        if (RunMode.isSharedDataMode()) {
            // check warehouse
            long warehouseId = ConnectContext.get().getCurrentWarehouseId();
            List<Long> computeNodeIs =
                    GlobalStateMgr.getCurrentState().getWarehouseMgr().getAllComputeNodeIds(warehouseId);
            if (computeNodeIs.isEmpty()) {
                Warehouse warehouse = GlobalStateMgr.getCurrentState().getWarehouseMgr().getWarehouse(warehouseId);
                throw new DdlException("no available compute nodes in warehouse " + warehouse.getName());
            }
            allComputeNodeIds.addAll(computeNodeIs);
        } else {
            allComputeNodeIds = infoService.getBackendIds(false);

        }
        return allComputeNodeIds;
    }
@Test
    public void testGetTabletDistributionForSharedDataMode()
            throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {

        new MockUp<RunMode>() {
            @Mock
            public RunMode getCurrentRunMode() {
                return RunMode.SHARED_DATA;
            }
        };

        new Expectations() {
            {
                ConnectContext.get();
                minTimes = 0;
                result = connectContext;

                long warehouseId = 10000L;

                connectContext.getCurrentWarehouseId();
                minTimes = 0;
                result = warehouseId;

                GlobalStateMgr.getCurrentState().getWarehouseMgr().getAllComputeNodeIds(warehouseId);
                minTimes = 0;
                result = Lists.newArrayList(10003L, 10004L, 10005L);
            }
        };

        Object[] args = new Object[] {CatalogMocker.TEST_DB_NAME, CatalogMocker.TEST_TBL_NAME, null};
        List<List<String>> result = (List<List<String>>) getTabletDistributionMethod.invoke(null, args);
        Assert.assertEquals(3, result.size());
    }