public class WorkspaceServiceImpl extends DatabricksService implements WorkspaceService
client, mapper| Constructor and Description |
|---|
WorkspaceServiceImpl(DatabricksRestClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String path,
boolean recursive)
Deletes a specific workspace path.
|
byte[] |
exportWorkspace(ExportWorkspaceRequest exportWorkspaceRequest)
Exports a workspace path FROM databricks to local machine.
|
ObjectInfoDTO |
getStatus(String path)
Gets the status of a specific workspace path.
|
void |
importWorkspace(ImportWorkspaceRequest importWorkspaceRequest)
Imports files INTO databricks from local machine.
|
ObjectInfoDTO[] |
listStatus(String path)
Lists all objects in a specific db workspace path.
|
void |
mkdirs(String path)
Makes a path (and any parent paths if they do not exist) on db workspace.
|
public WorkspaceServiceImpl(DatabricksRestClient client)
public void delete(String path, boolean recursive) throws IOException, DatabricksRestException
WorkspaceServicedelete in interface WorkspaceServicepath - the workspace path to deleterecursive - whether or not its recursiveIOException - any other errorsDatabricksRestException - databricks specific errorspublic byte[] exportWorkspace(ExportWorkspaceRequest exportWorkspaceRequest) throws IOException, DatabricksRestException
WorkspaceServiceexportWorkspace in interface WorkspaceServiceexportWorkspaceRequest - the request objectIOException - any other errorsDatabricksRestException - any specific db errorspublic ObjectInfoDTO getStatus(String path) throws IOException, DatabricksRestException
WorkspaceServicegetStatus in interface WorkspaceServicepath - the workspace pathIOException - any other errorsDatabricksRestException - any specific db errorspublic void importWorkspace(ImportWorkspaceRequest importWorkspaceRequest) throws IOException, DatabricksRestException
WorkspaceServiceimportWorkspace in interface WorkspaceServiceimportWorkspaceRequest - the import workspace requestIOException - any other errorsDatabricksRestException - specific db exceptionspublic ObjectInfoDTO[] listStatus(String path) throws IOException, DatabricksRestException
WorkspaceServicelistStatus in interface WorkspaceServicepath - the db workspace pathIOException - any other errorsDatabricksRestException - specific db exceptionspublic void mkdirs(String path) throws IOException, DatabricksRestException
WorkspaceServicemkdirs in interface WorkspaceServicepath - the db workspace path to createIOException - any other errorsDatabricksRestException - any specific db exceptionsCopyright © 2023. All rights reserved.