[
https://issues.apache.org/jira/browse/TAJO-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14592746#comment-14592746
]
ASF GitHub Bot commented on TAJO-1616:
--------------------------------------
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/602#discussion_r32791000
--- Diff:
tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/Tablespace.java
---
@@ -69,24 +77,47 @@ public Tablespace(String storeType) {
*/
protected abstract void storageInit() throws IOException;
+ public String getName() {
+ return name;
+ }
+
+ public URI getUri() {
+ return uri;
+ }
+
+ public boolean isVisible() {
+ return visible;
+ }
+
+ public abstract void setConfig(String name, String value);
+
+ public abstract void setConfigs(Map<String, String> configs);
+
+ public String toString() {
+ return name + "=" + uri.toString();
+ }
+
+ public abstract long getTableVolume(URI uri) throws IOException;
+
/**
- * This method is called after executing "CREATE TABLE" statement.
- * If a storage is a file based storage, a storage manager may create
directory.
+ * if {@link StorageProperty#isArbitraryPathAllowed} is true,
+ * the storage allows arbitrary path accesses. In this case, the storage
must provide the root URI.
*
- * @param tableDesc Table description which is created.
- * @param ifNotExists Creates the table only when the table does not
exist.
- * @throws java.io.IOException
+ * @see {@link StorageProperty#isArbitraryPathAllowed}
+ * @return Root URI
*/
- public abstract void createTable(TableDesc tableDesc, boolean
ifNotExists) throws IOException;
+ public URI getRootUri() {
+ throw new UnsupportedException(
+ String.format("Tablespace '%s' does not allow the use of artibrary
paths", uri.toString()));
+ }
/**
- * This method is called after executing "DROP TABLE" statement with the
'PURGE' option
- * which is the option to delete all the data.
+ * Get Table URI
*
- * @param tableDesc
- * @throws java.io.IOException
+ * @param tableName
+ * @return
*/
- public abstract void purgeTable(TableDesc tableDesc) throws IOException;
+ public abstract URI getTableUri(String databaseName, String tableName);
--- End diff --
This API seems to be duplicated with TableSpaceManager.getTableUri(), even
though this has smaller functionality. Would you please explain any differences
and proper usages?
> Implement TablespaceManager to load Tablespaces
> -----------------------------------------------
>
> Key: TAJO-1616
> URL: https://issues.apache.org/jira/browse/TAJO-1616
> Project: Tajo
> Issue Type: Sub-task
> Components: storage
> Reporter: Hyunsik Choi
> Assignee: Hyunsik Choi
> Fix For: 0.11.0
>
>
> TablespaceManager should load Tablespace according to storage-default.json
> and storage-site.json.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)