[
https://issues.apache.org/jira/browse/TAJO-1730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14730461#comment-14730461
]
ASF GitHub Bot commented on TAJO-1730:
--------------------------------------
Github user hyunsik commented on a diff in the pull request:
https://github.com/apache/tajo/pull/719#discussion_r38728340
--- Diff:
tajo-storage/tajo-storage-jdbc/src/main/java/org/apache/tajo/storage/jdbc/JdbcFragment.java
---
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tajo.storage.jdbc;
+
+import com.google.protobuf.ByteString;
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.apache.tajo.catalog.proto.CatalogProtos;
+import org.apache.tajo.storage.fragment.Fragment;
+import org.apache.tajo.storage.jdbc.JdbcFragmentProtos.JdbcFragmentProto;
+import org.apache.tajo.util.TUtil;
+
+public class JdbcFragment implements Fragment, Comparable<JdbcFragment>,
Cloneable {
+ String uri;
+ String inputSourceId;
+ String [] hostNames;
+
+
+ public JdbcFragment(ByteString raw) throws
InvalidProtocolBufferException {
+ JdbcFragmentProto.Builder builder = JdbcFragmentProto.newBuilder();
+ builder.mergeFrom(raw);
+ builder.build();
+ init(builder.build());
+ }
+
+ public JdbcFragment(String inputSourceId, String uri) {
+ this.inputSourceId = inputSourceId;
+ this.uri = uri;
+ this.hostNames = extractHosts(uri);
+ }
+
+ private void init(JdbcFragmentProto proto) {
+ this.uri = proto.getUri();
+ this.inputSourceId = proto.getInputSourceId();
+ this.hostNames = proto.getHostsList().toArray(new String
[proto.getHostsCount()]);
+ }
+
+ private String [] extractHosts(String uri) {
+ return new String [] {};
--- End diff --
Fixed. Thanks!
> JDBC Tablespace support
> -----------------------
>
> Key: TAJO-1730
> URL: https://issues.apache.org/jira/browse/TAJO-1730
> Project: Tajo
> Issue Type: Improvement
> Components: Storage
> Reporter: Hyunsik Choi
> Assignee: Hyunsik Choi
> Fix For: 0.11.0
>
> Attachments: TAJO-1730.patch, TAJO-1730_2.patch, TAJO-1730_3.patch
>
>
> The main objective of this issue is to implement JDBC-based storage and its
> Tablespace implementation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)