Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
aebdfc6
[SPARK-19667][SQL]create table with hiveenabled in default database u…
windpiger Feb 20, 2017
825c0ad
rename a conf name
windpiger Feb 20, 2017
a2c9168
fix test faile
windpiger Feb 21, 2017
bacd528
process default database location when create/get database from metas…
windpiger Feb 22, 2017
3f6e061
remove an redundant line
windpiger Feb 22, 2017
96dcc7d
fix empty string location of database
windpiger Feb 22, 2017
f329387
modify the test case
windpiger Feb 22, 2017
83dba73
Merge branch 'master' into defaultDBPathInHive
windpiger Feb 22, 2017
58a0020
fix test failed
windpiger Feb 22, 2017
1dce2d7
add log to find out why jenkins failed
windpiger Feb 22, 2017
12f81d3
add scalastyle:off for println
windpiger Feb 22, 2017
56e83d5
fix test faile
windpiger Feb 22, 2017
901bb1c
make warehouse path qualified for default database
windpiger Feb 23, 2017
99d9746
remove a string s
windpiger Feb 23, 2017
db555e3
modify a comment
windpiger Feb 23, 2017
d327994
fix test failed
windpiger Feb 23, 2017
73c8802
move to sessioncatalog
windpiger Feb 23, 2017
747b31a
remove import
windpiger Feb 23, 2017
8f8063f
remove an import
windpiger Feb 23, 2017
4dc11c1
modify some codestyle and some comment
windpiger Feb 24, 2017
9c0773b
Merge branch 'defaultDBPathInHive' of github.com:windpiger/spark into…
windpiger Feb 24, 2017
80b8133
mv defaultdb path logic to ExternalCatalog
windpiger Feb 27, 2017
41ea115
modify a comment
windpiger Feb 27, 2017
13245e4
modify a comment
windpiger Feb 27, 2017
096ae63
add final def
windpiger Mar 1, 2017
badd61b
modify some code
windpiger Mar 2, 2017
35d2b59
add lazy flag
windpiger Mar 2, 2017
e3a467e
modify test case
windpiger Mar 3, 2017
ae9938a
modify test case
windpiger Mar 3, 2017
7739ccd
mv getdatabase
windpiger Mar 3, 2017
f93f5d3
merge with master
windpiger Mar 8, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
modify some codestyle and some comment
  • Loading branch information
windpiger committed Feb 24, 2017
commit 4dc11c1e5b4fbf4f293d4f7003090ccd39e8fd68
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,14 @@ class SessionCatalog(
requireDbExists(dbName)
val database = externalCatalog.getDatabase(dbName)

// default database's location always use the warehouse path,
// and since the location of database stored in metastore is qualified,
// here we also make qualify for warehouse location
// The default database's location always uses the warehouse path.
// Since the location of database stored in metastore is qualified,
// we also make the warehouse location qualified.
val dbLocation = if (dbName == SessionCatalog.DEFAULT_DATABASE) {
SessionCatalog.makeQualifiedPath(conf.warehousePath, hadoopConf).toString
} else database.locationUri
} else {
database.locationUri
}

database.copy(locationUri = dbLocation)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,14 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, hadoopConf: Configurat
}

private def defaultTablePath(tableIdent: TableIdentifier): String = {
// default database's location always use the warehouse path,
// and since the location of database stored in metastore is qualified,
// here we also make qualify for warehouse location
// The default database's location always uses the warehouse path.
// Since the location of database stored in metastore is qualified,
// we also make the warehouse location qualified.
val dbLocation = if (tableIdent.database.orNull == SessionCatalog.DEFAULT_DATABASE) {
SessionCatalog.makeQualifiedPath(conf.get(WAREHOUSE_PATH), hadoopConf).toString
} else getDatabase(tableIdent.database.get).locationUri
} else {
getDatabase(tableIdent.database.get).locationUri
}

new Path(new Path(dbLocation), tableIdent.table).toString
}
Expand Down