@GET @Produces(MediaType.APPLICATION_JSON) public Home getHome(@QueryParam("includeContents") @DefaultValue("true") boolean includeContents) throws NamespaceException, HomeNotFoundException, DatasetNotFoundException { try { long dsCount = namespaceService.getDatasetCount(homePath.toNamespaceKey(), BoundedDatasetCount.SEARCH_TIME_LIMIT_MS, BoundedDatasetCount.COUNT_LIMIT_TO_STOP_SEARCH).getCount(); final HomeConfig homeConfig = namespaceService.getHome(homePath.toNamespaceKey()).setExtendedConfig(new ExtendedConfig().setDatasetCount(dsCount)); Home home = newHome(homePath, homeConfig); if (includeContents) { home.setContents(newNamespaceTree(namespaceService.list(homePath.toNamespaceKey()))); } return home; } catch (NamespaceNotFoundException nfe) { throw new HomeNotFoundException(homePath.getHomeName(), nfe); } }
public ExtendedConfig newMessage() { return new ExtendedConfig(); }
public void writeTo(Output output, HomeConfig message) throws IOException { if(message.id != null) output.writeObject(1, message.id, com.dremio.service.namespace.proto.EntityId.getSchema(), false); if(message.owner != null) output.writeString(2, message.owner, false); if(message.ctime != null) output.writeInt64(3, message.ctime, false); if(message.extendedConfig != null) output.writeObject(4, message.extendedConfig, ExtendedConfig.getSchema(), false); if(message.version != null) output.writeInt64(5, message.version, false); if(message.tag != null) output.writeString(6, message.tag, false); }
assertEquals(1, (long) home.getHomeConfig().getExtendedConfig().getDatasetCount());
break; case 5: message.extendedConfig = input.mergeObject(message.extendedConfig, ExtendedConfig.getSchema())
HomeConfig home = namespaceService.getHome(homePath.toNamespaceKey()); long dsCount = namespaceService.getAllDatasetsCount(homePath.toNamespaceKey()); home.setExtendedConfig(new ExtendedConfig().setDatasetCount(dsCount)); spaceInfo = newHome(homePath, home); } else if ("space".equals(type)) {
public void writeTo(Output output, FolderConfig message) throws IOException { if(message.id != null) output.writeObject(1, message.id, com.dremio.service.namespace.proto.EntityId.getSchema(), false); if(message.fullPath != null) { for(String fullPath : message.fullPath) { if(fullPath != null) output.writeString(2, fullPath, true); } } if(message.name != null) output.writeString(3, message.name, false); if(message.isPhysicalDataset != null) output.writeBool(4, message.isPhysicalDataset, false); if(message.extendedConfig != null) output.writeObject(5, message.extendedConfig, ExtendedConfig.getSchema(), false); if(message.version != null) output.writeInt64(6, message.version, false); if(message.tag != null) output.writeString(7, message.tag, false); }
public void writeTo(Output output, SpaceConfig message) throws IOException { if(message.id != null) output.writeObject(1, message.id, com.dremio.service.namespace.proto.EntityId.getSchema(), false); if(message.name != null) output.writeString(2, message.name, false); if(message.description != null) output.writeString(3, message.description, false); if(message.pinned != null) output.writeBool(4, message.pinned, false); if(message.readonly != null) output.writeBool(5, message.readonly, false); if(message.ctime != null) output.writeInt64(6, message.ctime, false); if(message.extendedConfig != null) output.writeObject(7, message.extendedConfig, ExtendedConfig.getSchema(), false); if(message.version != null) output.writeInt64(8, message.version, false); if(message.tag != null) output.writeString(9, message.tag, false); }
break; case 4: message.extendedConfig = input.mergeObject(message.extendedConfig, ExtendedConfig.getSchema())
break; case 7: message.extendedConfig = input.mergeObject(message.extendedConfig, ExtendedConfig.getSchema())