Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
allwefantasy committed Sep 12, 2018
1 parent 46376fa commit 3e07808
Show file tree
Hide file tree
Showing 175 changed files with 54 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/en/msql-auth-contorl.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class DefaultConsoleClient extends TableAuth with Logging with WowLog {
Suppose you run MLSQL script like this:

```sql
set __auth_client__="streaming.dsl.auth.meta.client.DefaultConsoleClient";
load parquet.`/tmp/abc` as newtable;
select * from default.abc as cool;
```
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# *************************************************************************
# *** DO NOT TOUCH FILES IN THIS DIRECTORY! ***
# *** FILES IN THIS DIRECTORY AND SUBDIRECTORIES CONSTITUTE A DERBY ***
# *** DATABASE, WHICH INCLUDES THE DATA (USER AND SYSTEM) AND THE ***
# *** FILES NECESSARY FOR DATABASE RECOVERY. ***
# *** EDITING, ADDING, OR DELETING ANY OF THESE FILES MAY CAUSE DATA ***
# *** CORRUPTION AND LEAVE THE DATABASE IN A NON-RECOVERABLE STATE. ***
# *************************************************************************
Binary file added streamingpro-crawler/metastore_db/db.lck
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/dbex.lck
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# *************************************************************************
# *** DO NOT TOUCH FILES IN THIS DIRECTORY! ***
# *** FILES IN THIS DIRECTORY ARE USED BY THE DERBY DATABASE RECOVERY ***
# *** SYSTEM. EDITING, ADDING, OR DELETING FILES IN THIS DIRECTORY ***
# *** WILL CAUSE THE DERBY RECOVERY SYSTEM TO FAIL, LEADING TO ***
# *** NON-RECOVERABLE CORRUPT DATABASES. ***
# *************************************************************************
Binary file added streamingpro-crawler/metastore_db/log/log.ctrl
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# *************************************************************************
# *** DO NOT TOUCH FILES IN THIS DIRECTORY! ***
# *** FILES IN THIS DIRECTORY ARE USED BY THE DERBY DATABASE TO STORE ***
# *** USER AND SYSTEM DATA. EDITING, ADDING, OR DELETING FILES IN THIS ***
# *** DIRECTORY WILL CORRUPT THE ASSOCIATED DERBY DATABASE AND MAKE ***
# *** IT NON-RECOVERABLE. ***
# *************************************************************************
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/seg0/c20.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/seg0/c230.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/seg0/c31.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/seg0/c41.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/seg0/c51.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/seg0/c60.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/seg0/c90.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/seg0/ca1.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/seg0/cb1.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added streamingpro-crawler/metastore_db/seg0/cf0.dat
Binary file not shown.
23 changes: 23 additions & 0 deletions streamingpro-crawler/metastore_db/service.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#/Users/allwefantasy/CSDNWorkSpace/streamingpro/streamingpro-crawler/metastore_db
# ********************************************************************
# *** Please do NOT edit this file. ***
# *** CHANGING THE CONTENT OF THIS FILE MAY CAUSE DATA CORRUPTION. ***
# ********************************************************************
#Tue Sep 11 21:47:22 CST 2018
SysschemasIndex2Identifier=225
SyscolumnsIdentifier=144
SysconglomeratesIndex1Identifier=49
SysconglomeratesIdentifier=32
SyscolumnsIndex2Identifier=177
SysschemasIndex1Identifier=209
SysconglomeratesIndex3Identifier=81
SystablesIndex2Identifier=129
SyscolumnsIndex1Identifier=161
derby.serviceProtocol=org.apache.derby.database.Database
SysschemasIdentifier=192
derby.storage.propertiesId=16
SysconglomeratesIndex2Identifier=65
derby.serviceLocale=en_US
SystablesIdentifier=96
SystablesIndex1Identifier=113
#--- last line, don't put anything after this line ---
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ object ScriptSQLExec extends Logging with WowLog {
// setListener.env()
val authListener = new AuthProcessListener(setListener)
_parse(input, authListener)
val tableAuth = Class.forName(authListener.listener.env().getOrElse("auth_client", "streaming.dsl.auth.meta.client.DefaultConsoleClient")).newInstance().asInstanceOf[TableAuth]
val tableAuth = Class.forName(authListener.listener.env().getOrElse("__auth_client__", "streaming.dsl.auth.meta.client.DefaultConsoleClient")).newInstance().asInstanceOf[TableAuth]
tableAuth.auth(authListener.tables().tables.toList)
}
_parse(wow, listener)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package streaming.dsl.auth.meta.client

import streaming.dsl.ScriptSQLExec
import streaming.dsl.auth.{MLSQLTable, TableAuth, TableAuthResult}
import streaming.log.{Logging, WowLog}

Expand All @@ -8,7 +9,8 @@ import streaming.log.{Logging, WowLog}
*/
class DefaultConsoleClient extends TableAuth with Logging with WowLog {
override def auth(tables: List[MLSQLTable]): List[TableAuthResult] = {
logInfo(format(s"auth ${tables.mkString(",")}"))
val owner = ScriptSQLExec.contextGetOrForTest().owner
logInfo(format(s"auth ${owner} want access tables: ${tables.mkString(",")}"))
throw new RuntimeException("auth fail")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@ class DslSpec extends BasicSparkOperation with SpecFunctions with BasicMLSQLConf
val ssel = createSSEL
val mlsql =
"""
|set auth_client="streaming.dsl.auth.meta.client.DefaultConsoleClient";
|load parquet.`/tmp/abc` as newtable;
|select * from default.abc as cool;
""".stripMargin
Expand Down

0 comments on commit 3e07808

Please sign in to comment.