-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CORE] Import JDBC module #55
base: master
Are you sure you want to change the base?
Conversation
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.spark.sql.xsql.manager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank
def this() = { | ||
this(null) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def this() = this(null)
@@ -675,7 +675,7 @@ private[xsql] class XSQLExternalCatalog(conf: SparkConf, hadoopConf: Configurati | |||
case ELASTICSEARCH => CatalogTableType.TYPE | |||
case MONGO => CatalogTableType.COLLECTION | |||
case HBASE => CatalogTableType.HBASE | |||
case MYSQL | ORACLE => CatalogTableType.JDBC | |||
case MYSQL | JDBC => CatalogTableType.JDBC | |||
case DRUID => CatalogTableType.JDBC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case JDBC => CatalogTableType.JDBC
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't moved mysql to the jdbc module in this PR. So l didn't remove MYSQL for MysqlManager could work normally.
@@ -24,7 +24,7 @@ package org.apache.spark.sql.xsql | |||
object DataSourceType extends Enumeration { | |||
|
|||
type DataSourceType = Value | |||
val HIVE, ELASTICSEARCH, MONGO, REDIS, MYSQL, KAFKA, HBASE, DRUID, ORACLE, EXTERNAL = Value | |||
val HIVE, ELASTICSEARCH, MONGO, REDIS, JDBC, MYSQL, KAFKA, HBASE, DRUID, EXTERNAL = Value | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could remove MYSQL
?
Could you make the description have more detail? |
<artifactId>xsql-hive_${scala.binary.version}</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why there need the dependence xsql-hive
?
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These dependencies are used for testing.l forgot to remove them.
def getUser: String = username | ||
def getPwd: String = passwd | ||
} | ||
|
||
class MysqlDataSource( | ||
private val name: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we remove MysqlDataSource
?
What changes were proposed in this pull request?
This PR imports JDBC module for XSQL, Creating class of
JDBCManager
and implementing some standard SQL functions. It works with some common jdbc data sources.How was this patch tested?
No UT.