kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luke...@apache.org
Subject [24/51] [partial] incubator-kylin git commit: cleanup for migration from github.com
Date Wed, 14 Jan 2015 14:15:59 GMT
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/main/java/com/kylinolap/jdbc/stub/KylinClient.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/com/kylinolap/jdbc/stub/KylinClient.java b/jdbc/src/main/java/com/kylinolap/jdbc/stub/KylinClient.java
deleted file mode 100644
index 0e8fbcf..0000000
--- a/jdbc/src/main/java/com/kylinolap/jdbc/stub/KylinClient.java
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed 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 com.kylinolap.jdbc.stub;
-
-import java.io.IOException;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.hydromatic.avatica.AvaticaStatement;
-import net.hydromatic.avatica.ColumnMetaData;
-import net.hydromatic.avatica.ColumnMetaData.Rep;
-import net.hydromatic.avatica.ColumnMetaData.ScalarType;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpMethodBase;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.commons.httpclient.methods.StringRequestEntity;
-import org.apache.commons.httpclient.protocol.Protocol;
-import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.collect.HashMultimap;
-import com.kylinolap.jdbc.KylinConnectionImpl;
-import com.kylinolap.jdbc.KylinEnumerator;
-import com.kylinolap.jdbc.KylinJdbc41Factory.KylinJdbc41PreparedStatement;
-import com.kylinolap.jdbc.KylinMetaImpl.MetaCatalog;
-import com.kylinolap.jdbc.KylinMetaImpl.MetaColumn;
-import com.kylinolap.jdbc.KylinMetaImpl.MetaProject;
-import com.kylinolap.jdbc.KylinMetaImpl.MetaSchema;
-import com.kylinolap.jdbc.KylinMetaImpl.MetaTable;
-import com.kylinolap.jdbc.stub.TableMetaStub.ColumnMetaStub;
-import com.kylinolap.jdbc.util.DefaultSslProtocolSocketFactory;
-import com.kylinolap.jdbc.util.SQLTypeMap;
-
-/**
- * @author xduo
- * 
- */
-public class KylinClient implements RemoteClient {
-    private static final Logger logger = LoggerFactory.getLogger(KylinClient.class);
-
-    private final KylinConnectionImpl conn;
-
-    public KylinClient(KylinConnectionImpl conn) {
-        this.conn = conn;
-    }
-
-    @Override
-    public void connect() throws ConnectionException {
-        PostMethod post = new PostMethod(conn.getConnectUrl());
-        HttpClient httpClient = new HttpClient();
-
-        if (conn.getConnectUrl().toLowerCase().startsWith("https://")) {
-            registerSsl();
-        }
-        addPostHeaders(post);
-
-        try {
-            StringRequestEntity requestEntity = new StringRequestEntity("{}", "application/json", "UTF-8");
-            post.setRequestEntity(requestEntity);
-            httpClient.executeMethod(post);
-
-            if (post.getStatusCode() != 200 && post.getStatusCode() != 201) {
-                logger.error("Authentication Failed with error code " + post.getStatusCode() + " and message:\n" + post.getResponseBodyAsString());
-
-                throw new ConnectionException("Authentication Failed.");
-            }
-        } catch (HttpException e) {
-            logger.error(e.getLocalizedMessage(), e);
-            throw new ConnectionException(e.getLocalizedMessage());
-        } catch (IOException e) {
-            logger.error(e.getLocalizedMessage(), e);
-            throw new ConnectionException(e.getLocalizedMessage());
-        }
-    }
-
-    @Override
-    public MetaProject getMetadata(String project) throws ConnectionException {
-        GetMethod get = new GetMethod(conn.getMetaProjectUrl(project));
-        HttpClient httpClient = new HttpClient();
-
-        if (conn.getConnectUrl().toLowerCase().startsWith("https://")) {
-            registerSsl();
-        }
-        addPostHeaders(get);
-
-        List<TableMetaStub> tableMetaStubs = null;
-        try {
-            httpClient.executeMethod(get);
-
-            if (get.getStatusCode() != 200 && get.getStatusCode() != 201) {
-                logger.error("Authentication Failed with error code " + get.getStatusCode() + " and message:\n" + get.getResponseBodyAsString());
-
-                throw new ConnectionException("Authentication Failed.");
-            }
-
-            tableMetaStubs = new ObjectMapper().readValue(get.getResponseBodyAsString(), new TypeReference<List<TableMetaStub>>() {
-            });
-
-            List<MetaTable> tables = new ArrayList<MetaTable>();
-            HashMultimap<String, MetaTable> schemasMap = HashMultimap.create();
-
-            for (TableMetaStub tableMetaStub : tableMetaStubs) {
-                List<MetaColumn> columns = new ArrayList<MetaColumn>();
-
-                for (ColumnMetaStub columnMetaStub : tableMetaStub.getColumns()) {
-                    MetaColumn column = createNewColumn(columnMetaStub);
-                    columns.add(column);
-                }
-
-                MetaTable table = createNewTable(tableMetaStub, columns);
-                tables.add(table);
-                schemasMap.put(tableMetaStub.getTABLE_CAT() + "#" + tableMetaStub.getTABLE_SCHEM(), table);
-            }
-
-            HashMultimap<String, MetaSchema> catalogMap = HashMultimap.create();
-            List<MetaSchema> schemas = new ArrayList<MetaSchema>();
-            for (String key : schemasMap.keySet()) {
-                String cat = key.split("#")[0];
-                String schema = key.split("#")[1];
-                MetaSchema metaSchema = new MetaSchema(cat, schema, new ArrayList<MetaTable>(schemasMap.get(key)));
-                schemas.add(metaSchema);
-                catalogMap.put(cat, metaSchema);
-            }
-
-            List<MetaCatalog> catalogs = new ArrayList<MetaCatalog>();
-            for (String key : catalogMap.keySet()) {
-                MetaCatalog metaCatalog = new MetaCatalog(key, new ArrayList<MetaSchema>(catalogMap.get(key)));
-                catalogs.add(metaCatalog);
-            }
-
-            return new MetaProject(project, catalogs);
-        } catch (HttpException e) {
-            logger.error(e.getLocalizedMessage(), e);
-            throw new ConnectionException(e.getLocalizedMessage());
-        } catch (IOException e) {
-            logger.error(e.getLocalizedMessage(), e);
-            throw new ConnectionException(e.getLocalizedMessage());
-        }
-    }
-
-    private MetaTable createNewTable(TableMetaStub tableMetaStub, List<MetaColumn> columns) {
-        MetaTable table = new MetaTable(tableMetaStub.getTABLE_CAT(), tableMetaStub.getTABLE_SCHEM(), tableMetaStub.getTABLE_NAME(), tableMetaStub.getTABLE_TYPE(), tableMetaStub.getREMARKS(), tableMetaStub.getTYPE_CAT(), tableMetaStub.getTYPE_SCHEM(), tableMetaStub.getTYPE_NAME(), tableMetaStub.getSELF_REFERENCING_COL_NAME(), tableMetaStub.getREF_GENERATION(), columns);
-        return table;
-    }
-
-    private MetaColumn createNewColumn(ColumnMetaStub columnMetaStub) {
-        MetaColumn column = new MetaColumn(columnMetaStub.getTABLE_CAT(), columnMetaStub.getTABLE_SCHEM(), columnMetaStub.getTABLE_NAME(), columnMetaStub.getCOLUMN_NAME(), columnMetaStub.getDATA_TYPE(), columnMetaStub.getTYPE_NAME(), columnMetaStub.getCOLUMN_SIZE(), columnMetaStub.getBUFFER_LENGTH(), columnMetaStub.getDECIMAL_DIGITS(), columnMetaStub.getNUM_PREC_RADIX(), columnMetaStub.getNULLABLE(), columnMetaStub.getREMARKS(), columnMetaStub.getCOLUMN_DEF(), columnMetaStub.getSQL_DATA_TYPE(), columnMetaStub.getSQL_DATETIME_SUB(), columnMetaStub.getCHAR_OCTET_LENGTH(), columnMetaStub.getORDINAL_POSITION(), columnMetaStub.getIS_NULLABLE(), columnMetaStub.getSCOPE_CATLOG(), columnMetaStub.getSCOPE_TABLE(), columnMetaStub.getSOURCE_DATA_TYPE(), columnMetaStub.getIS_AUTOINCREMENT(), columnMetaStub.getSCOPE_SCHEMA());
-        return column;
-    }
-
-    @Override
-    public DataSet<Object[]> query(AvaticaStatement statement, String sql) throws SQLException {
-        SQLResponseStub queryRes = null;
-
-        List<StateParam> params = null;
-        if (statement instanceof KylinJdbc41PreparedStatement) {
-            params = genPrestateStates(statement);
-        }
-
-        queryRes = runKylinQuery(sql, params);
-
-        List<ColumnMetaData> metas = genColumnMeta(queryRes);
-        List<Object[]> data = genResultData(queryRes, metas);
-
-        return new DataSet<Object[]>(metas, new KylinEnumerator<Object[]>(data));
-    }
-
-    /**
-     * @param queryRes
-     * @param metas
-     * @return
-     */
-    private List<Object[]> genResultData(SQLResponseStub queryRes, List<ColumnMetaData> metas) {
-        List<Object[]> data = new ArrayList<Object[]>();
-        for (String[] result : queryRes.getResults()) {
-            Object[] row = new Object[result.length];
-
-            for (int i = 0; i < result.length; i++) {
-                ColumnMetaData meta = metas.get(i);
-                row[i] = SQLTypeMap.wrapObject(result[i], meta.type.type);
-            }
-
-            data.add(row);
-        }
-        return data;
-    }
-
-    /**
-     * @param statement
-     * @param params
-     */
-    private List<StateParam> genPrestateStates(AvaticaStatement statement) {
-        List<StateParam> params = new ArrayList<StateParam>();
-        List<Object> values = ((KylinJdbc41PreparedStatement) statement).getParameterValues();
-
-        for (int i = 0; i < values.size(); i++) {
-            Object value = values.get(i);
-            params.add(new StateParam(value.getClass().getCanonicalName(), String.valueOf(value)));
-        }
-
-        return params;
-    }
-
-    /**
-     * @param queryRes
-     * @return
-     */
-    private List<ColumnMetaData> genColumnMeta(SQLResponseStub queryRes) {
-        List<ColumnMetaData> metas = new ArrayList<ColumnMetaData>();
-        for (int i = 0; i < queryRes.getColumnMetas().size(); i++) {
-            SQLResponseStub.ColumnMetaStub scm = queryRes.getColumnMetas().get(i);
-            ScalarType type = ColumnMetaData.scalar(scm.getColumnType(), scm.getColumnTypeName(), Rep.of(SQLTypeMap.convert(scm.getColumnType())));
-
-            ColumnMetaData meta = new ColumnMetaData(i, scm.isAutoIncrement(), scm.isCaseSensitive(), scm.isSearchable(), scm.isCurrency(), scm.getIsNullable(), scm.isSigned(), scm.getDisplaySize(), scm.getLabel(), scm.getName(), scm.getSchemaName(), scm.getPrecision(), scm.getScale(), scm.getTableName(), scm.getSchemaName(), type, scm.isReadOnly(), scm.isWritable(), scm.isWritable(), null);
-
-            metas.add(meta);
-        }
-
-        return metas;
-    }
-
-    /**
-     * @param sql
-     * @return
-     * @throws IOException
-     */
-    private SQLResponseStub runKylinQuery(String sql, List<StateParam> params) throws SQLException {
-        String url = conn.getQueryUrl();
-        String project = conn.getProject();
-        QueryRequest request = null;
-
-        if (null != params) {
-            request = new PreQueryRequest();
-            ((PreQueryRequest) request).setParams(params);
-            url += "/prestate";
-        } else {
-            request = new QueryRequest();
-        }
-        request.setSql(sql);
-        request.setProject(project);
-
-        PostMethod post = new PostMethod(url);
-        addPostHeaders(post);
-        HttpClient httpClient = new HttpClient();
-        if (conn.getQueryUrl().toLowerCase().startsWith("https://")) {
-            registerSsl();
-        }
-
-        String postBody = null;
-        ObjectMapper mapper = new ObjectMapper();
-        try {
-            postBody = mapper.writeValueAsString(request);
-            logger.debug("Post body:\n " + postBody);
-        } catch (JsonProcessingException e) {
-            logger.error(e.getLocalizedMessage(), e);
-        }
-        String response = null;
-        SQLResponseStub queryRes = null;
-
-        try {
-            StringRequestEntity requestEntity = new StringRequestEntity(postBody, "application/json", "UTF-8");
-            post.setRequestEntity(requestEntity);
-
-            httpClient.executeMethod(post);
-            response = post.getResponseBodyAsString();
-
-            if (post.getStatusCode() != 200 && post.getStatusCode() != 201) {
-                logger.error("Failed to query", response);
-                throw new SQLException(response);
-            }
-
-            queryRes = new ObjectMapper().readValue(response, SQLResponseStub.class);
-
-        } catch (HttpException e) {
-            logger.error(e.getLocalizedMessage(), e);
-            throw new SQLException(e.getLocalizedMessage());
-        } catch (IOException e) {
-            logger.error(e.getLocalizedMessage(), e);
-            throw new SQLException(e.getLocalizedMessage());
-        }
-
-        return queryRes;
-    }
-
-    private void addPostHeaders(HttpMethodBase method) {
-        method.addRequestHeader("Accept", "application/json, text/plain, */*");
-        method.addRequestHeader("Content-Type", "application/json");
-        method.addRequestHeader("Authorization", "Basic " + conn.getBasicAuthHeader());
-    }
-
-    private void registerSsl() {
-        Protocol.registerProtocol("https", new Protocol("https", (ProtocolSocketFactory) new DefaultSslProtocolSocketFactory(), 443));
-    }
-
-    public class QueryRequest {
-        private String sql;
-        private String project;
-
-        public String getSql() {
-            return sql;
-        }
-
-        public void setSql(String sql) {
-            this.sql = sql;
-        }
-
-        public String getProject() {
-            return project;
-        }
-
-        public void setProject(String project) {
-            this.project = project;
-        }
-    }
-
-    public class PreQueryRequest extends QueryRequest {
-        private List<StateParam> params;
-
-        public List<StateParam> getParams() {
-            return params;
-        }
-
-        public void setParams(List<StateParam> params) {
-            this.params = params;
-        }
-    }
-
-    public class StateParam {
-        private String className;
-        private String value;
-
-        public StateParam(String className, String value) {
-            super();
-            this.className = className;
-            this.value = value;
-        }
-
-        public String getClassName() {
-            return className;
-        }
-
-        public void setClazz(String className) {
-            this.className = className;
-        }
-
-        public String getValue() {
-            return value;
-        }
-
-        public void setValue(String value) {
-            this.value = value;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/main/java/com/kylinolap/jdbc/stub/KylinColumnMetaData.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/com/kylinolap/jdbc/stub/KylinColumnMetaData.java b/jdbc/src/main/java/com/kylinolap/jdbc/stub/KylinColumnMetaData.java
deleted file mode 100644
index a3d5c84..0000000
--- a/jdbc/src/main/java/com/kylinolap/jdbc/stub/KylinColumnMetaData.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed 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 com.kylinolap.jdbc.stub;
-
-import java.sql.DatabaseMetaData;
-
-import net.hydromatic.avatica.ColumnMetaData;
-
-/**
- * @author xduo
- * 
- */
-public class KylinColumnMetaData extends ColumnMetaData {
-
-    public KylinColumnMetaData(int ordinal, boolean autoIncrement, boolean caseSensitive, boolean searchable, boolean currency, int nullable, boolean signed, int displaySize, String label, String columnName, String schemaName, int precision, int scale, String tableName, String catalogName, AvaticaType type, boolean readOnly, boolean writable, boolean definitelyWritable, String columnClassName) {
-        super(ordinal, autoIncrement, caseSensitive, searchable, currency, nullable, signed, displaySize, label, columnName, schemaName, precision, scale, tableName, catalogName, type, readOnly, writable, definitelyWritable, columnClassName);
-    }
-
-    public static ColumnMetaData dummy(int ordinal, String label, String columnName, AvaticaType type, boolean nullable) {
-        return new ColumnMetaData(ordinal, false, true, false, false, nullable ? DatabaseMetaData.columnNullable : DatabaseMetaData.columnNoNulls, true, -1, label, columnName, null, -1, -1, null, null, type, true, false, false, null);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/main/java/com/kylinolap/jdbc/stub/RemoteClient.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/com/kylinolap/jdbc/stub/RemoteClient.java b/jdbc/src/main/java/com/kylinolap/jdbc/stub/RemoteClient.java
deleted file mode 100644
index 43ded3b..0000000
--- a/jdbc/src/main/java/com/kylinolap/jdbc/stub/RemoteClient.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed 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 com.kylinolap.jdbc.stub;
-
-import java.sql.SQLException;
-
-import net.hydromatic.avatica.AvaticaStatement;
-
-import com.kylinolap.jdbc.KylinMetaImpl.MetaProject;
-
-/**
- * Remote query stub of kylin restful service
- * 
- * @author xduo
- * 
- */
-public interface RemoteClient {
-
-    /**
-     * Connect to kylin restful service. ConnectionException will be thrown if
-     * authentication failed.
-     * 
-     * @throws ConnectionException
-     */
-    public void connect() throws ConnectionException;
-
-    /**
-     * @param project
-     * @return
-     */
-    public MetaProject getMetadata(String project) throws ConnectionException;
-
-    /**
-     * Run query
-     * 
-     * @param statement
-     * @param sql
-     * @return
-     * @throws SQLException
-     */
-    public DataSet<Object[]> query(AvaticaStatement statement, String sql) throws SQLException;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/main/java/com/kylinolap/jdbc/stub/SQLResponseStub.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/com/kylinolap/jdbc/stub/SQLResponseStub.java b/jdbc/src/main/java/com/kylinolap/jdbc/stub/SQLResponseStub.java
deleted file mode 100644
index d980d8d..0000000
--- a/jdbc/src/main/java/com/kylinolap/jdbc/stub/SQLResponseStub.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed 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 com.kylinolap.jdbc.stub;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * @author xduo
- * 
- */
-public class SQLResponseStub implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    // private static final Logger logger =
-    // LoggerFactory.getLogger(SQLResponse.class);
-
-    // the data type for each column
-    private List<ColumnMetaStub> columnMetas;
-
-    // the results rows, each row contains several columns
-    private List<String[]> results;
-
-    private String cube;
-
-    // if not select query, only return affected row count
-    private int affectedRowCount;
-
-    // if isException, the detailed exception message
-    private String exceptionMessage;
-
-    private boolean isException;
-
-    private long duration;
-
-    private boolean isPartial = false;
-
-    private long totalScanCount;
-
-    private boolean hitCache = false;
-
-    public SQLResponseStub() {
-    }
-
-    public List<ColumnMetaStub> getColumnMetas() {
-        return columnMetas;
-    }
-
-    public void setColumnMetas(List<ColumnMetaStub> columnMetas) {
-        this.columnMetas = columnMetas;
-    }
-
-    public List<String[]> getResults() {
-        return results;
-    }
-
-    public void setResults(List<String[]> results) {
-        this.results = results;
-    }
-
-    public String getCube() {
-        return cube;
-    }
-
-    public void setCube(String cube) {
-        this.cube = cube;
-    }
-
-    public int getAffectedRowCount() {
-        return affectedRowCount;
-    }
-
-    public void setAffectedRowCount(int affectedRowCount) {
-        this.affectedRowCount = affectedRowCount;
-    }
-
-    public boolean getIsException() {
-        return isException;
-    }
-
-    public void setIsException(boolean isException) {
-        this.isException = isException;
-    }
-
-    public String getExceptionMessage() {
-        return exceptionMessage;
-    }
-
-    public void setExceptionMessage(String exceptionMessage) {
-        this.exceptionMessage = exceptionMessage;
-    }
-
-    public long getDuration() {
-        return duration;
-    }
-
-    public void setDuration(long duration) {
-        this.duration = duration;
-    }
-
-    public boolean isPartial() {
-        return isPartial;
-    }
-
-    public void setPartial(boolean isPartial) {
-        this.isPartial = isPartial;
-    }
-
-    public long getTotalScanCount() {
-        return totalScanCount;
-    }
-
-    public void setTotalScanCount(long totalScanCount) {
-        this.totalScanCount = totalScanCount;
-    }
-
-    public boolean isHitCache() {
-        return hitCache;
-    }
-
-    public void setHitCache(boolean hitCache) {
-        this.hitCache = hitCache;
-    }
-
-    public static long getSerialversionuid() {
-        return serialVersionUID;
-    }
-
-    public static class ColumnMetaStub {
-
-        private boolean isAutoIncrement;
-        private boolean isCaseSensitive;
-        private boolean isSearchable;
-        private boolean isCurrency;
-        private int isNullable;// 0:nonull, 1:nullable, 2: nullableunknown
-        private boolean isSigned;
-        private int displaySize;
-        private String label;// AS keyword
-        private String name;
-        private String schemaName;
-        private String catelogName;
-        private String tableName;
-        private int precision;
-        private int scale;
-        private int columnType;// as defined in java.sql.Types
-        private String columnTypeName;
-        private boolean isReadOnly;
-        private boolean isWritable;
-        private boolean isDefinitelyWritable;
-
-        public ColumnMetaStub() {
-        }
-
-        public boolean isAutoIncrement() {
-            return isAutoIncrement;
-        }
-
-        public void setAutoIncrement(boolean isAutoIncrement) {
-            this.isAutoIncrement = isAutoIncrement;
-        }
-
-        public boolean isCaseSensitive() {
-            return isCaseSensitive;
-        }
-
-        public void setCaseSensitive(boolean isCaseSensitive) {
-            this.isCaseSensitive = isCaseSensitive;
-        }
-
-        public boolean isSearchable() {
-            return isSearchable;
-        }
-
-        public void setSearchable(boolean isSearchable) {
-            this.isSearchable = isSearchable;
-        }
-
-        public boolean isCurrency() {
-            return isCurrency;
-        }
-
-        public void setCurrency(boolean isCurrency) {
-            this.isCurrency = isCurrency;
-        }
-
-        public int getIsNullable() {
-            return isNullable;
-        }
-
-        public void setIsNullable(int isNullable) {
-            this.isNullable = isNullable;
-        }
-
-        public boolean isSigned() {
-            return isSigned;
-        }
-
-        public void setSigned(boolean isSigned) {
-            this.isSigned = isSigned;
-        }
-
-        public int getDisplaySize() {
-            return displaySize;
-        }
-
-        public void setDisplaySize(int displaySize) {
-            this.displaySize = displaySize;
-        }
-
-        public String getLabel() {
-            return label;
-        }
-
-        public void setLabel(String label) {
-            this.label = label;
-        }
-
-        public String getName() {
-            return name;
-        }
-
-        public void setName(String name) {
-            this.name = name;
-        }
-
-        public String getSchemaName() {
-            return schemaName;
-        }
-
-        public void setSchemaName(String schemaName) {
-            this.schemaName = schemaName;
-        }
-
-        public String getCatelogName() {
-            return catelogName;
-        }
-
-        public void setCatelogName(String catelogName) {
-            this.catelogName = catelogName;
-        }
-
-        public String getTableName() {
-            return tableName;
-        }
-
-        public void setTableName(String tableName) {
-            this.tableName = tableName;
-        }
-
-        public int getPrecision() {
-            return precision;
-        }
-
-        public void setPrecision(int precision) {
-            this.precision = precision;
-        }
-
-        public int getScale() {
-            return scale;
-        }
-
-        public void setScale(int scale) {
-            this.scale = scale;
-        }
-
-        public int getColumnType() {
-            return columnType;
-        }
-
-        public void setColumnType(int columnType) {
-            this.columnType = columnType;
-        }
-
-        public String getColumnTypeName() {
-            return columnTypeName;
-        }
-
-        public void setColumnTypeName(String columnTypeName) {
-            this.columnTypeName = columnTypeName;
-        }
-
-        public boolean isReadOnly() {
-            return isReadOnly;
-        }
-
-        public void setReadOnly(boolean isReadOnly) {
-            this.isReadOnly = isReadOnly;
-        }
-
-        public boolean isWritable() {
-            return isWritable;
-        }
-
-        public void setWritable(boolean isWritable) {
-            this.isWritable = isWritable;
-        }
-
-        public boolean isDefinitelyWritable() {
-            return isDefinitelyWritable;
-        }
-
-        public void setDefinitelyWritable(boolean isDefinitelyWritable) {
-            this.isDefinitelyWritable = isDefinitelyWritable;
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/main/java/com/kylinolap/jdbc/stub/TableMetaStub.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/com/kylinolap/jdbc/stub/TableMetaStub.java b/jdbc/src/main/java/com/kylinolap/jdbc/stub/TableMetaStub.java
deleted file mode 100644
index 88290b4..0000000
--- a/jdbc/src/main/java/com/kylinolap/jdbc/stub/TableMetaStub.java
+++ /dev/null
@@ -1,329 +0,0 @@
-package com.kylinolap.jdbc.stub;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * @author xduo
- * 
- */
-public class TableMetaStub {
-
-    private static final long serialVersionUID = 1L;
-    private String TABLE_CAT;
-    private String TABLE_SCHEM;
-    private String TABLE_NAME;
-    private String TABLE_TYPE;
-    private String REMARKS;
-    private String TYPE_CAT;
-    private String TYPE_SCHEM;
-    private String TYPE_NAME;
-    private String SELF_REFERENCING_COL_NAME;
-    private String REF_GENERATION;
-    @JsonProperty("columns")
-    private List<ColumnMetaStub> columns = new ArrayList<ColumnMetaStub>();
-
-    public String getTABLE_CAT() {
-        return TABLE_CAT;
-    }
-
-    public void setTABLE_CAT(String tABLE_CAT) {
-        TABLE_CAT = tABLE_CAT;
-    }
-
-    public String getTABLE_SCHEM() {
-        return TABLE_SCHEM;
-    }
-
-    public void setTABLE_SCHEM(String tABLE_SCHEM) {
-        TABLE_SCHEM = tABLE_SCHEM;
-    }
-
-    public String getTABLE_NAME() {
-        return TABLE_NAME;
-    }
-
-    public void setTABLE_NAME(String tABLE_NAME) {
-        TABLE_NAME = tABLE_NAME;
-    }
-
-    public String getTABLE_TYPE() {
-        return TABLE_TYPE;
-    }
-
-    public void setTABLE_TYPE(String tABLE_TYPE) {
-        TABLE_TYPE = tABLE_TYPE;
-    }
-
-    public String getREMARKS() {
-        return REMARKS;
-    }
-
-    public void setREMARKS(String rEMARKS) {
-        REMARKS = rEMARKS;
-    }
-
-    public String getTYPE_CAT() {
-        return TYPE_CAT;
-    }
-
-    public void setTYPE_CAT(String tYPE_CAT) {
-        TYPE_CAT = tYPE_CAT;
-    }
-
-    public String getTYPE_SCHEM() {
-        return TYPE_SCHEM;
-    }
-
-    public void setTYPE_SCHEM(String tYPE_SCHEM) {
-        TYPE_SCHEM = tYPE_SCHEM;
-    }
-
-    public String getTYPE_NAME() {
-        return TYPE_NAME;
-    }
-
-    public void setTYPE_NAME(String tYPE_NAME) {
-        TYPE_NAME = tYPE_NAME;
-    }
-
-    public String getSELF_REFERENCING_COL_NAME() {
-        return SELF_REFERENCING_COL_NAME;
-    }
-
-    public void setSELF_REFERENCING_COL_NAME(String sELF_REFERENCING_COL_NAME) {
-        SELF_REFERENCING_COL_NAME = sELF_REFERENCING_COL_NAME;
-    }
-
-    public String getREF_GENERATION() {
-        return REF_GENERATION;
-    }
-
-    public void setREF_GENERATION(String rEF_GENERATION) {
-        REF_GENERATION = rEF_GENERATION;
-    }
-
-    public List<ColumnMetaStub> getColumns() {
-        return columns;
-    }
-
-    public void setColumns(List<ColumnMetaStub> columns) {
-        this.columns = columns;
-    }
-
-    public static long getSerialversionuid() {
-        return serialVersionUID;
-    }
-
-    public static class ColumnMetaStub {
-        private String TABLE_CAT;
-        private String TABLE_SCHEM;
-        private String TABLE_NAME;
-        private String COLUMN_NAME;
-        private int DATA_TYPE;
-        private String TYPE_NAME;
-        private int COLUMN_SIZE;
-        private int BUFFER_LENGTH;
-        private int DECIMAL_DIGITS;
-        private int NUM_PREC_RADIX;
-        private int NULLABLE;
-        private String REMARKS;
-        private String COLUMN_DEF;
-        private int SQL_DATA_TYPE;
-        private int SQL_DATETIME_SUB;
-        private int CHAR_OCTET_LENGTH;
-        private int ORDINAL_POSITION;
-        private String IS_NULLABLE;
-        private String SCOPE_CATLOG;
-        private String SCOPE_SCHEMA;
-        private String SCOPE_TABLE;
-        private short SOURCE_DATA_TYPE;
-        private String IS_AUTOINCREMENT;
-
-        public String getTABLE_CAT() {
-            return TABLE_CAT;
-        }
-
-        public void setTABLE_CAT(String tABLE_CAT) {
-            TABLE_CAT = tABLE_CAT;
-        }
-
-        public String getTABLE_SCHEM() {
-            return TABLE_SCHEM;
-        }
-
-        public void setTABLE_SCHEM(String tABLE_SCHEM) {
-            TABLE_SCHEM = tABLE_SCHEM;
-        }
-
-        public String getTABLE_NAME() {
-            return TABLE_NAME;
-        }
-
-        public void setTABLE_NAME(String tABLE_NAME) {
-            TABLE_NAME = tABLE_NAME;
-        }
-
-        public String getCOLUMN_NAME() {
-            return COLUMN_NAME;
-        }
-
-        public void setCOLUMN_NAME(String cOLUMN_NAME) {
-            COLUMN_NAME = cOLUMN_NAME;
-        }
-
-        public int getDATA_TYPE() {
-            return DATA_TYPE;
-        }
-
-        public void setDATA_TYPE(int dATA_TYPE) {
-            DATA_TYPE = dATA_TYPE;
-        }
-
-        public String getTYPE_NAME() {
-            return TYPE_NAME;
-        }
-
-        public void setTYPE_NAME(String tYPE_NAME) {
-            TYPE_NAME = tYPE_NAME;
-        }
-
-        public int getCOLUMN_SIZE() {
-            return COLUMN_SIZE;
-        }
-
-        public void setCOLUMN_SIZE(int cOLUMN_SIZE) {
-            COLUMN_SIZE = cOLUMN_SIZE;
-        }
-
-        public int getBUFFER_LENGTH() {
-            return BUFFER_LENGTH;
-        }
-
-        public void setBUFFER_LENGTH(int bUFFER_LENGTH) {
-            BUFFER_LENGTH = bUFFER_LENGTH;
-        }
-
-        public int getDECIMAL_DIGITS() {
-            return DECIMAL_DIGITS;
-        }
-
-        public void setDECIMAL_DIGITS(int dECIMAL_DIGITS) {
-            DECIMAL_DIGITS = dECIMAL_DIGITS;
-        }
-
-        public int getNUM_PREC_RADIX() {
-            return NUM_PREC_RADIX;
-        }
-
-        public void setNUM_PREC_RADIX(int nUM_PREC_RADIX) {
-            NUM_PREC_RADIX = nUM_PREC_RADIX;
-        }
-
-        public int getNULLABLE() {
-            return NULLABLE;
-        }
-
-        public void setNULLABLE(int nULLABLE) {
-            NULLABLE = nULLABLE;
-        }
-
-        public String getREMARKS() {
-            return REMARKS;
-        }
-
-        public void setREMARKS(String rEMARKS) {
-            REMARKS = rEMARKS;
-        }
-
-        public String getCOLUMN_DEF() {
-            return COLUMN_DEF;
-        }
-
-        public void setCOLUMN_DEF(String cOLUMN_DEF) {
-            COLUMN_DEF = cOLUMN_DEF;
-        }
-
-        public int getSQL_DATA_TYPE() {
-            return SQL_DATA_TYPE;
-        }
-
-        public void setSQL_DATA_TYPE(int sQL_DATA_TYPE) {
-            SQL_DATA_TYPE = sQL_DATA_TYPE;
-        }
-
-        public int getSQL_DATETIME_SUB() {
-            return SQL_DATETIME_SUB;
-        }
-
-        public void setSQL_DATETIME_SUB(int sQL_DATETIME_SUB) {
-            SQL_DATETIME_SUB = sQL_DATETIME_SUB;
-        }
-
-        public int getCHAR_OCTET_LENGTH() {
-            return CHAR_OCTET_LENGTH;
-        }
-
-        public void setCHAR_OCTET_LENGTH(int cHAR_OCTET_LENGTH) {
-            CHAR_OCTET_LENGTH = cHAR_OCTET_LENGTH;
-        }
-
-        public int getORDINAL_POSITION() {
-            return ORDINAL_POSITION;
-        }
-
-        public void setORDINAL_POSITION(int oRDINAL_POSITION) {
-            ORDINAL_POSITION = oRDINAL_POSITION;
-        }
-
-        public String getIS_NULLABLE() {
-            return IS_NULLABLE;
-        }
-
-        public void setIS_NULLABLE(String iS_NULLABLE) {
-            IS_NULLABLE = iS_NULLABLE;
-        }
-
-        public String getSCOPE_CATLOG() {
-            return SCOPE_CATLOG;
-        }
-
-        public void setSCOPE_CATLOG(String sCOPE_CATLOG) {
-            SCOPE_CATLOG = sCOPE_CATLOG;
-        }
-
-        public String getSCOPE_SCHEMA() {
-            return SCOPE_SCHEMA;
-        }
-
-        public void setSCOPE_SCHEMA(String sCOPE_SCHEMA) {
-            SCOPE_SCHEMA = sCOPE_SCHEMA;
-        }
-
-        public String getSCOPE_TABLE() {
-            return SCOPE_TABLE;
-        }
-
-        public void setSCOPE_TABLE(String sCOPE_TABLE) {
-            SCOPE_TABLE = sCOPE_TABLE;
-        }
-
-        public short getSOURCE_DATA_TYPE() {
-            return SOURCE_DATA_TYPE;
-        }
-
-        public void setSOURCE_DATA_TYPE(short sOURCE_DATA_TYPE) {
-            SOURCE_DATA_TYPE = sOURCE_DATA_TYPE;
-        }
-
-        public String getIS_AUTOINCREMENT() {
-            return IS_AUTOINCREMENT;
-        }
-
-        public void setIS_AUTOINCREMENT(String iS_AUTOINCREMENT) {
-            this.IS_AUTOINCREMENT = iS_AUTOINCREMENT;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/main/java/com/kylinolap/jdbc/util/DefaultSslProtocolSocketFactory.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/com/kylinolap/jdbc/util/DefaultSslProtocolSocketFactory.java b/jdbc/src/main/java/com/kylinolap/jdbc/util/DefaultSslProtocolSocketFactory.java
deleted file mode 100644
index a9fb61b..0000000
--- a/jdbc/src/main/java/com/kylinolap/jdbc/util/DefaultSslProtocolSocketFactory.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed 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 com.kylinolap.jdbc.util;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.net.UnknownHostException;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-
-import org.apache.commons.httpclient.ConnectTimeoutException;
-import org.apache.commons.httpclient.HttpClientError;
-import org.apache.commons.httpclient.params.HttpConnectionParams;
-import org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory;
-import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author xduo
- * 
- */
-public class DefaultSslProtocolSocketFactory implements SecureProtocolSocketFactory {
-    /** Log object for this class. */
-    private static Logger LOG = LoggerFactory.getLogger(DefaultSslProtocolSocketFactory.class);
-    private SSLContext sslcontext = null;
-
-    /**
-     * Constructor for DefaultSslProtocolSocketFactory.
-     */
-    public DefaultSslProtocolSocketFactory() {
-        super();
-    }
-
-    /**
-     * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int,java.net.InetAddress,int)
-     */
-    public Socket createSocket(String host, int port, InetAddress clientHost, int clientPort) throws IOException, UnknownHostException {
-        return getSSLContext().getSocketFactory().createSocket(host, port, clientHost, clientPort);
-    }
-
-    /**
-     * Attempts to get a new socket connection to the given host within the
-     * given time limit.
-     * 
-     * <p>
-     * To circumvent the limitations of older JREs that do not support connect
-     * timeout a controller thread is executed. The controller thread attempts
-     * to create a new socket within the given limit of time. If socket
-     * constructor does not return until the timeout expires, the controller
-     * terminates and throws an {@link ConnectTimeoutException}
-     * </p>
-     * 
-     * @param host
-     *            the host name/IP
-     * @param port
-     *            the port on the host
-     * @param localAddress
-     *            the local host name/IP to bind the socket to
-     * @param localPort
-     *            the port on the local machine
-     * @param params
-     *            {@link HttpConnectionParams Http connection parameters}
-     * 
-     * @return Socket a new socket
-     * 
-     * @throws IOException
-     *             if an I/O error occurs while creating the socket
-     * @throws UnknownHostException
-     *             if the IP address of the host cannot be determined
-     * @throws ConnectTimeoutException
-     *             DOCUMENT ME!
-     * @throws IllegalArgumentException
-     *             DOCUMENT ME!
-     */
-    public Socket createSocket(final String host, final int port, final InetAddress localAddress, final int localPort, final HttpConnectionParams params) throws IOException, UnknownHostException, ConnectTimeoutException {
-        if (params == null) {
-            throw new IllegalArgumentException("Parameters may not be null");
-        }
-
-        int timeout = params.getConnectionTimeout();
-
-        if (timeout == 0) {
-            return createSocket(host, port, localAddress, localPort);
-        } else {
-            // To be eventually deprecated when migrated to Java 1.4 or above
-            return ControllerThreadSocketFactory.createSocket(this, host, port, localAddress, localPort, timeout);
-        }
-    }
-
-    /**
-     * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int)
-     */
-    public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
-        return getSSLContext().getSocketFactory().createSocket(host, port);
-    }
-
-    /**
-     * @see SecureProtocolSocketFactory#createSocket(java.net.Socket,java.lang.String,int,boolean)
-     */
-    public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException {
-        return getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose);
-    }
-
-    public boolean equals(Object obj) {
-        return ((obj != null) && obj.getClass().equals(DefaultX509TrustManager.class));
-    }
-
-    public int hashCode() {
-        return DefaultX509TrustManager.class.hashCode();
-    }
-
-    private static SSLContext createEasySSLContext() {
-        try {
-            SSLContext context = SSLContext.getInstance("TLS");
-            context.init(null, new TrustManager[] { new DefaultX509TrustManager(null) }, null);
-
-            return context;
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            throw new HttpClientError(e.toString());
-        }
-    }
-
-    private SSLContext getSSLContext() {
-        if (this.sslcontext == null) {
-            this.sslcontext = createEasySSLContext();
-        }
-
-        return this.sslcontext;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/main/java/com/kylinolap/jdbc/util/DefaultX509TrustManager.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/com/kylinolap/jdbc/util/DefaultX509TrustManager.java b/jdbc/src/main/java/com/kylinolap/jdbc/util/DefaultX509TrustManager.java
deleted file mode 100644
index 89b8f23..0000000
--- a/jdbc/src/main/java/com/kylinolap/jdbc/util/DefaultX509TrustManager.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed 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 com.kylinolap.jdbc.util;
-
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.TrustManagerFactory;
-import javax.net.ssl.X509TrustManager;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author xduo
- * 
- */
-public class DefaultX509TrustManager implements X509TrustManager {
-
-    /** Log object for this class. */
-    private static Logger LOG = LoggerFactory.getLogger(DefaultX509TrustManager.class);
-    private X509TrustManager standardTrustManager = null;
-
-    /**
-     * Constructor for DefaultX509TrustManager.
-     * 
-     */
-    public DefaultX509TrustManager(KeyStore keystore) throws NoSuchAlgorithmException, KeyStoreException {
-        super();
-
-        TrustManagerFactory factory = TrustManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
-        factory.init(keystore);
-
-        TrustManager[] trustmanagers = factory.getTrustManagers();
-
-        if (trustmanagers.length == 0) {
-            throw new NoSuchAlgorithmException("SunX509 trust manager not supported");
-        }
-
-        this.standardTrustManager = (X509TrustManager) trustmanagers[0];
-    }
-
-    public X509Certificate[] getAcceptedIssuers() {
-        return this.standardTrustManager.getAcceptedIssuers();
-    }
-
-    public boolean isClientTrusted(X509Certificate[] certificates) {
-        return true;
-        // return this.standardTrustManager.isClientTrusted(certificates);
-    }
-
-    public boolean isServerTrusted(X509Certificate[] certificates) {
-        if ((certificates != null) && LOG.isDebugEnabled()) {
-            LOG.debug("Server certificate chain:");
-
-            for (int i = 0; i < certificates.length; i++) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("X509Certificate[" + i + "]=" + certificates[i]);
-                }
-            }
-        }
-
-        if ((certificates != null) && (certificates.length == 1)) {
-            X509Certificate certificate = certificates[0];
-
-            try {
-                certificate.checkValidity();
-            } catch (CertificateException e) {
-                LOG.error(e.toString());
-
-                return false;
-            }
-
-            return true;
-        } else {
-            return true;
-            // return this.standardTrustManager.isServerTrusted(certificates);
-        }
-    }
-
-    @Override
-    public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
-        // TODO Auto-generated method stub
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/main/java/com/kylinolap/jdbc/util/SQLTypeMap.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/com/kylinolap/jdbc/util/SQLTypeMap.java b/jdbc/src/main/java/com/kylinolap/jdbc/util/SQLTypeMap.java
deleted file mode 100644
index 12eff56..0000000
--- a/jdbc/src/main/java/com/kylinolap/jdbc/util/SQLTypeMap.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed 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 com.kylinolap.jdbc.util;
-
-import java.math.BigDecimal;
-import java.sql.Date;
-import java.sql.Time;
-import java.sql.Timestamp;
-import java.sql.Types;
-import java.util.HashMap;
-import java.util.Map;
-
-import net.hydromatic.avatica.ColumnMetaData;
-import net.hydromatic.avatica.ColumnMetaData.Rep;
-
-import com.kylinolap.jdbc.stub.KylinColumnMetaData;
-
-/**
- * Util class to handle type gap between sql types and java types.
- * 
- * @author xduo
- * 
- */
-public class SQLTypeMap {
-
-    public final static Map<String, ColumnMetaData> schemaMetaTypeMapping = new HashMap<String, ColumnMetaData>();
-
-    public final static Map<String, ColumnMetaData> columnMetaTypeMapping = new HashMap<String, ColumnMetaData>();
-
-    public final static Map<String, ColumnMetaData> tableMetaTypeMapping = new HashMap<String, ColumnMetaData>();
-
-    static {
-        schemaMetaTypeMapping.put("TABLE_CAT", KylinColumnMetaData.dummy(0, "TABLE_SCHEM", "TABLE_SCHEM", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        schemaMetaTypeMapping.put("TABLE_SCHEM", KylinColumnMetaData.dummy(1, "TABLE_CATALOG", "TABLE_CATALOG", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-
-        tableMetaTypeMapping.put("TABLE_CAT", KylinColumnMetaData.dummy(0, "TABLE_CAT", "TABLE_CAT", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        tableMetaTypeMapping.put("TABLE_SCHEM", KylinColumnMetaData.dummy(1, "TABLE_SCHEM", "TABLE_SCHEM", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        tableMetaTypeMapping.put("TABLE_NAME", KylinColumnMetaData.dummy(2, "TABLE_NAME", "TABLE_NAME", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        tableMetaTypeMapping.put("TABLE_TYPE", KylinColumnMetaData.dummy(3, "TABLE_TYPE", "TABLE_TYPE", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        tableMetaTypeMapping.put("REMARKS", KylinColumnMetaData.dummy(4, "REMARKS", "REMARKS", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        tableMetaTypeMapping.put("TYPE_CAT", KylinColumnMetaData.dummy(5, "TYPE_CAT", "TYPE_CAT", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        tableMetaTypeMapping.put("TYPE_SCHEM", KylinColumnMetaData.dummy(6, "TYPE_SCHEM", "TYPE_SCHEM", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        tableMetaTypeMapping.put("TYPE_NAME", KylinColumnMetaData.dummy(7, "TYPE_NAME", "TYPE_NAME", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        tableMetaTypeMapping.put("SELF_REFERENCING_COL_NAME", KylinColumnMetaData.dummy(8, "SELF_REFERENCING_COL_NAME", "SELF_REFERENCING_COL_NAME", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        tableMetaTypeMapping.put("REF_GENERATION", KylinColumnMetaData.dummy(9, "REF_GENERATION", "REF_GENERATION", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-
-        columnMetaTypeMapping.put("TABLE_CAT", KylinColumnMetaData.dummy(0, "TABLE_CAT", "TABLE_CAT", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("TABLE_SCHEM", KylinColumnMetaData.dummy(1, "TABLE_SCHEM", "TABLE_SCHEM", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("TABLE_NAME", KylinColumnMetaData.dummy(2, "TABLE_NAME", "TABLE_NAME", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("COLUMN_NAME", KylinColumnMetaData.dummy(3, "COLUMN_NAME", "COLUMN_NAME", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("DATA_TYPE", KylinColumnMetaData.dummy(4, "DATA_TYPE", "DATA_TYPE", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("TYPE_NAME", KylinColumnMetaData.dummy(5, "TYPE_NAME", "TYPE_NAME", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("COLUMN_SIZE", KylinColumnMetaData.dummy(6, "COLUMN_SIZE", "COLUMN_SIZE", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("BUFFER_LENGTH", KylinColumnMetaData.dummy(7, "BUFFER_LENGTH", "BUFFER_LENGTH", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("DECIMAL_DIGITS", KylinColumnMetaData.dummy(8, "DECIMAL_DIGITS", "DECIMAL_DIGITS", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("NUM_PREC_RADIX", KylinColumnMetaData.dummy(9, "NUM_PREC_RADIX", "NUM_PREC_RADIX", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("NULLABLE", KylinColumnMetaData.dummy(10, "NULLABLE", "NULLABLE", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("REMARKS", KylinColumnMetaData.dummy(11, "REMARKS", "REMARKS", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("COLUMN_DEF", KylinColumnMetaData.dummy(12, "COLUMN_DEF", "COLUMN_DEF", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("SQL_DATA_TYPE", KylinColumnMetaData.dummy(13, "SQL_DATA_TYPE", "SQL_DATA_TYPE", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("SQL_DATETIME_SUB", KylinColumnMetaData.dummy(14, "SQL_DATETIME_SUB", "SQL_DATETIME_SUB", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("CHAR_OCTET_LENGTH", KylinColumnMetaData.dummy(15, "CHAR_OCTET_LENGTH", "CHAR_OCTET_LENGTH", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("ORDINAL_POSITION", KylinColumnMetaData.dummy(16, "ORDINAL_POSITION", "ORDINAL_POSITION", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("IS_NULLABLE", KylinColumnMetaData.dummy(17, "IS_NULLABLE", "IS_NULLABLE", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("SCOPE_CATALOG", KylinColumnMetaData.dummy(18, "SCOPE_CATALOG", "SCOPE_CATALOG", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("SCOPE_TABLE", KylinColumnMetaData.dummy(19, "SCOPE_TABLE", "SCOPE_TABLE", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("SOURCE_DATA_TYPE", KylinColumnMetaData.dummy(20, "SOURCE_DATA_TYPE", "SOURCE_DATA_TYPE", ColumnMetaData.scalar(Types.INTEGER, "integer", Rep.INTEGER), true));
-        columnMetaTypeMapping.put("IS_AUTOINCREMENT", KylinColumnMetaData.dummy(21, "IS_AUTOINCREMENT", "IS_AUTOINCREMENT", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        columnMetaTypeMapping.put("IS_GENERATEDCOLUMN", KylinColumnMetaData.dummy(22, "IS_GENERATEDCOLUMN", "IS_GENERATEDCOLUMN", ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-    }
-
-    @SuppressWarnings("rawtypes")
-    public static Class convert(int sqlType) {
-        Class result = Object.class;
-
-        switch (sqlType) {
-        case Types.CHAR:
-        case Types.VARCHAR:
-        case Types.LONGVARCHAR:
-            result = String.class;
-            break;
-        case Types.NUMERIC:
-        case Types.DECIMAL:
-            result = BigDecimal.class;
-            break;
-        case Types.BIT:
-            result = Boolean.class;
-            break;
-        case Types.TINYINT:
-            result = Byte.class;
-            break;
-        case Types.SMALLINT:
-            result = Short.class;
-            break;
-        case Types.INTEGER:
-            result = Integer.class;
-            break;
-        case Types.BIGINT:
-            result = Long.class;
-            break;
-        case Types.REAL:
-        case Types.FLOAT:
-        case Types.DOUBLE:
-            result = Double.class;
-            break;
-        case Types.BINARY:
-        case Types.VARBINARY:
-        case Types.LONGVARBINARY:
-            result = Byte[].class;
-            break;
-        case Types.DATE:
-            result = Date.class;
-            break;
-        case Types.TIME:
-            result = Time.class;
-            break;
-        case Types.TIMESTAMP:
-            result = Timestamp.class;
-            break;
-        }
-
-        return result;
-    }
-
-    public static Object wrapObject(String value, int sqlType) {
-        if (null == value) {
-            return null;
-        }
-
-        switch (sqlType) {
-        case Types.CHAR:
-        case Types.VARCHAR:
-        case Types.LONGVARCHAR:
-            return value;
-        case Types.NUMERIC:
-        case Types.DECIMAL:
-            return new BigDecimal(value);
-        case Types.BIT:
-            return Boolean.parseBoolean(value);
-        case Types.TINYINT:
-            return Byte.valueOf(value);
-        case Types.SMALLINT:
-            return Short.valueOf(value);
-        case Types.INTEGER:
-            return Integer.parseInt(value);
-        case Types.BIGINT:
-        case Types.REAL:
-        case Types.FLOAT:
-        case Types.DOUBLE:
-            return Long.parseLong(value);
-        case Types.BINARY:
-        case Types.VARBINARY:
-        case Types.LONGVARBINARY:
-            return value.getBytes();
-        case Types.DATE:
-            return Date.valueOf(value);
-        case Types.TIME:
-            return Time.valueOf(value);
-        case Types.TIMESTAMP:
-            return Timestamp.valueOf(value);
-        }
-
-        return value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/main/resources/com-kylinolap-kylin-jdbc.properties
----------------------------------------------------------------------
diff --git a/jdbc/src/main/resources/com-kylinolap-kylin-jdbc.properties b/jdbc/src/main/resources/com-kylinolap-kylin-jdbc.properties
deleted file mode 100644
index c16246b..0000000
--- a/jdbc/src/main/resources/com-kylinolap-kylin-jdbc.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-driver.name=Kylin JDBC Driver
-driver.version=0.1
-product.name=Kylin
-product.version=0.1
-jdbc.compliant=true
-driver.version.major=0
-driver.version.minor=8
-database.version.major=0
-database.version.minor=8
-build.timestamp=20140918-2017
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/jdbc/src/main/resources/log4j.properties b/jdbc/src/main/resources/log4j.properties
deleted file mode 100644
index 8910f8b..0000000
--- a/jdbc/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-#define appenders
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%t]:[%d{yyyy-MM-dd HH:mm:ss,SSS}][%p][%l] - %m%n
-
-log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.File=kylin_jdbc.log
-log4j.appender.file.layout.ConversionPattern=[%t]:[%d{yyyy-MM-dd HH:mm:ss,SSS}][%p][%l] - %m%n
-log4j.appender.file.Append=true
-
-#overall config
-log4j.rootLogger=DEBUG,stdout,file
-#log4j.logger.com.kylinolap=DEBUG,stdout,file
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/test/java/com/kylinolap/jdbc/DriverTest.java
----------------------------------------------------------------------
diff --git a/jdbc/src/test/java/com/kylinolap/jdbc/DriverTest.java b/jdbc/src/test/java/com/kylinolap/jdbc/DriverTest.java
deleted file mode 100644
index dbc4551..0000000
--- a/jdbc/src/test/java/com/kylinolap/jdbc/DriverTest.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package com.kylinolap.jdbc;
-
-import static org.junit.Assert.*;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Properties;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
-import com.kylinolap.jdbc.Driver;
-
-/**
- * Unit test for Driver.
- * 
- * @author xduo
- * 
- */
-public class DriverTest {
-
-    @Test
-    public void testStatementWithMockData() throws SQLException {
-        Driver driver = new DummyDriver();
-
-        Connection conn = driver.connect("jdbc:kylin://test_url/test_db", null);
-
-        ResultSet tables = conn.getMetaData().getTables(null, null, null, null);
-        while (tables.next()) {
-            for (int i = 0; i < 10; i++) {
-                assertEquals("dummy", tables.getString(i + 1));
-            }
-        }
-
-        Statement state = conn.createStatement();
-        ResultSet resultSet = state.executeQuery("select * from test_table");
-
-        ResultSetMetaData metadata = resultSet.getMetaData();
-        assertEquals(12, metadata.getColumnType(1));
-        assertEquals("varchar", metadata.getColumnTypeName(1));
-        assertEquals(1, metadata.isNullable(1));
-
-        while (resultSet.next()) {
-            assertEquals("foo", resultSet.getString(1));
-            assertEquals("bar", resultSet.getString(2));
-            assertEquals("tool", resultSet.getString(3));
-        }
-    }
-
-    @Test
-    public void testPreStatementWithMockData() throws SQLException {
-        Driver driver = new DummyDriver();
-
-        Connection conn = driver.connect("jdbc:kylin://test_url/test_db", null);
-        PreparedStatement state = conn.prepareStatement("select * from test_table where id=?");
-        state.setInt(1, 10);
-        ResultSet resultSet = state.executeQuery();
-
-        ResultSetMetaData metadata = resultSet.getMetaData();
-        assertEquals(12, metadata.getColumnType(1));
-        assertEquals("varchar", metadata.getColumnTypeName(1));
-        assertEquals(1, metadata.isNullable(1));
-
-        while (resultSet.next()) {
-            assertEquals("foo", resultSet.getString(1));
-            assertEquals("bar", resultSet.getString(2));
-            assertEquals("tool", resultSet.getString(3));
-        }
-    }
-
-    @Ignore
-    @Test
-    public void testWithCubeData() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {
-        Driver driver = (Driver) Class.forName("com.kylinolap.kylin.jdbc.Driver").newInstance();
-        Properties info = new Properties();
-        info.put("user", "");
-        info.put("password", "");
-        Connection conn = driver.connect("jdbc:kylin://localhost/default", info);
-
-        ResultSet catalogs = conn.getMetaData().getCatalogs();
-        while (catalogs.next()) {
-            System.out.println(catalogs.getString("TABLE_CAT"));
-        }
-
-        ResultSet schemas = conn.getMetaData().getSchemas();
-        while (schemas.next()) {
-            System.out.println(schemas.getString(1));
-            System.out.println(schemas.getString(2));
-        }
-
-        ResultSet tables = conn.getMetaData().getTables(null, null, null, null);
-        while (tables.next()) {
-            String tableName = tables.getString(3);
-            assertEquals(tables.getString("TABLE_NAME"), tableName);
-            ResultSet columns = conn.getMetaData().getColumns(null, null, tableName, null);
-
-            while (columns.next()) {
-                System.out.println(columns.getString("COLUMN_NAME"));
-                String column = "";
-                for (int i = 0; i < 23; i++) {
-                    column += columns.getString(i + 1) + ", ";
-                }
-
-                System.out.println("Column in table " + tableName + ": " + column);
-            }
-        }
-
-        for (int j = 0; j < 3; j++) {
-            Statement state = conn.createStatement();
-            ResultSet resultSet = state.executeQuery("select * from test_kylin_fact");
-
-            ResultSetMetaData metadata = resultSet.getMetaData();
-            System.out.println("Metadata:");
-
-            for (int i = 0; i < metadata.getColumnCount(); i++) {
-                String metaStr = metadata.getCatalogName(i + 1) + " " + metadata.getColumnClassName(i + 1) + " " + metadata.getColumnDisplaySize(i + 1) + " " + metadata.getColumnLabel(i + 1) + " " + metadata.getColumnName(i + 1) + " " + metadata.getColumnType(i + 1) + " " + metadata.getColumnTypeName(i + 1) + " " + metadata.getPrecision(i + 1) + " " + metadata.getScale(i + 1) + " " + metadata.getSchemaName(i + 1) + " " + metadata.getTableName(i + 1);
-                System.out.println(metaStr);
-            }
-
-            System.out.println("Data:");
-            while (resultSet.next()) {
-                String dataStr = resultSet.getFloat(1) + " " + resultSet.getInt(2) + " " + resultSet.getInt(3) + " " + resultSet.getLong(4) + " " + resultSet.getDate(5) + " " + resultSet.getString(6);
-                System.out.println(dataStr);
-            }
-        }
-    }
-
-    @Ignore
-    @Test
-    public void testPreStatementWithCubeData() throws SQLException {
-        Driver driver = new Driver();
-        Properties info = new Properties();
-        info.put("user", "");
-        info.put("password", "");
-        Connection conn = driver.connect("jdbc:kylin://localhost/default", info);
-        PreparedStatement state = conn.prepareStatement("select * from test_kylin_fact where seller_id=?");
-        state.setLong(1, 10000001);
-        ResultSet resultSet = state.executeQuery();
-
-        ResultSetMetaData metadata = resultSet.getMetaData();
-        System.out.println("Metadata:");
-
-        for (int i = 0; i < metadata.getColumnCount(); i++) {
-            String metaStr = metadata.getCatalogName(i + 1) + " " + metadata.getColumnClassName(i + 1) + " " + metadata.getColumnDisplaySize(i + 1) + " " + metadata.getColumnLabel(i + 1) + " " + metadata.getColumnName(i + 1) + " " + metadata.getColumnType(i + 1) + " " + metadata.getColumnTypeName(i + 1) + " " + metadata.getPrecision(i + 1) + " " + metadata.getScale(i + 1) + " " + metadata.getSchemaName(i + 1) + " " + metadata.getTableName(i + 1);
-            System.out.println(metaStr);
-        }
-
-        System.out.println("Data:");
-        while (resultSet.next()) {
-            String dataStr = resultSet.getFloat(1) + " " + resultSet.getInt(2) + " " + resultSet.getInt(3) + " " + resultSet.getLong(4) + " " + resultSet.getDate(5) + " " + resultSet.getString(6);
-            System.out.println(dataStr);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/test/java/com/kylinolap/jdbc/DummyClient.java
----------------------------------------------------------------------
diff --git a/jdbc/src/test/java/com/kylinolap/jdbc/DummyClient.java b/jdbc/src/test/java/com/kylinolap/jdbc/DummyClient.java
deleted file mode 100644
index 5673eaa..0000000
--- a/jdbc/src/test/java/com/kylinolap/jdbc/DummyClient.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.kylinolap.jdbc;
-
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.hydromatic.avatica.AvaticaStatement;
-import net.hydromatic.avatica.ColumnMetaData;
-import net.hydromatic.avatica.ColumnMetaData.Rep;
-import net.hydromatic.linq4j.Enumerator;
-
-import com.kylinolap.jdbc.KylinConnectionImpl;
-import com.kylinolap.jdbc.KylinEnumerator;
-import com.kylinolap.jdbc.KylinMetaImpl.MetaCatalog;
-import com.kylinolap.jdbc.KylinMetaImpl.MetaColumn;
-import com.kylinolap.jdbc.KylinMetaImpl.MetaProject;
-import com.kylinolap.jdbc.KylinMetaImpl.MetaSchema;
-import com.kylinolap.jdbc.KylinMetaImpl.MetaTable;
-import com.kylinolap.jdbc.stub.ConnectionException;
-import com.kylinolap.jdbc.stub.DataSet;
-import com.kylinolap.jdbc.stub.RemoteClient;
-
-/**
- * @author xduo
- * 
- */
-public class DummyClient implements RemoteClient {
-
-    public DummyClient(KylinConnectionImpl conn) {
-    }
-
-    @Override
-    public void connect() throws ConnectionException {
-    }
-
-    @Override
-    public MetaProject getMetadata(String project) throws ConnectionException {
-        List<ColumnMetaData> meta = new ArrayList<ColumnMetaData>();
-        for (int i = 0; i < 10; i++) {
-            meta.add(ColumnMetaData.dummy(ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        }
-
-        List<MetaTable> tables = new ArrayList<MetaTable>();
-        MetaTable table = new MetaTable("dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", new ArrayList<MetaColumn>());
-        tables.add(table);
-
-        List<MetaSchema> schemas = new ArrayList<MetaSchema>();
-        schemas.add(new MetaSchema("dummy", "dummy", tables));
-        List<MetaCatalog> catalogs = new ArrayList<MetaCatalog>();
-        catalogs.add(new MetaCatalog("dummy", schemas));
-
-        return new MetaProject(null, catalogs);
-    }
-
-    @Override
-    public DataSet<Object[]> query(AvaticaStatement statement, String sql) {
-        List<Object[]> data = new ArrayList<Object[]>();
-        Object[] row = new Object[] { "foo", "bar", "tool" };
-        data.add(row);
-        Enumerator<Object[]> enumerator = new KylinEnumerator<Object[]>(data);
-        List<ColumnMetaData> meta = new ArrayList<ColumnMetaData>();
-        meta.add(ColumnMetaData.dummy(ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        meta.add(ColumnMetaData.dummy(ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-        meta.add(ColumnMetaData.dummy(ColumnMetaData.scalar(Types.VARCHAR, "varchar", Rep.STRING), true));
-
-        return new DataSet<Object[]>(meta, enumerator);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/test/java/com/kylinolap/jdbc/DummyDriver.java
----------------------------------------------------------------------
diff --git a/jdbc/src/test/java/com/kylinolap/jdbc/DummyDriver.java b/jdbc/src/test/java/com/kylinolap/jdbc/DummyDriver.java
deleted file mode 100644
index 75e6e0f..0000000
--- a/jdbc/src/test/java/com/kylinolap/jdbc/DummyDriver.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.kylinolap.jdbc;
-
-import com.kylinolap.jdbc.Driver;
-
-/**
- * @author xduo
- * 
- */
-public class DummyDriver extends Driver {
-
-    @Override
-    protected String getFactoryClassName(JdbcVersion jdbcVersion) {
-        return "com.kylinolap.jdbc.DummyJdbc41Factory";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/jdbc/src/test/java/com/kylinolap/jdbc/DummyJdbc41Factory.java
----------------------------------------------------------------------
diff --git a/jdbc/src/test/java/com/kylinolap/jdbc/DummyJdbc41Factory.java b/jdbc/src/test/java/com/kylinolap/jdbc/DummyJdbc41Factory.java
deleted file mode 100644
index e4a4b55..0000000
--- a/jdbc/src/test/java/com/kylinolap/jdbc/DummyJdbc41Factory.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.kylinolap.jdbc;
-
-import com.kylinolap.jdbc.KylinConnectionImpl;
-import com.kylinolap.jdbc.KylinJdbc41Factory;
-import com.kylinolap.jdbc.stub.RemoteClient;
-
-/**
- * @author xduo
- * 
- */
-public class DummyJdbc41Factory extends KylinJdbc41Factory {
-
-    // ~ kylin sepcified
-    @Override
-    public RemoteClient newRemoteClient(KylinConnectionImpl connection) {
-        return new DummyClient(connection);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/job/.gitignore
----------------------------------------------------------------------
diff --git a/job/.gitignore b/job/.gitignore
deleted file mode 100644
index 0b42d2d..0000000
--- a/job/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/target

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/job/.settings/org.eclipse.core.resources.prefs
----------------------------------------------------------------------
diff --git a/job/.settings/org.eclipse.core.resources.prefs b/job/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 04cfa2c..0000000
--- a/job/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-eclipse.preferences.version=1
-encoding//src/main/java=UTF-8
-encoding//src/main/resources=UTF-8
-encoding//src/test/java=UTF-8
-encoding//src/test/resources=UTF-8
-encoding/<project>=UTF-8


Mime
View raw message