You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2020/07/02 06:51:41 UTC
[incubator-iotdb] branch seperate_thrift_and_antlr updated: remove
stale files
This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch seperate_thrift_and_antlr
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/seperate_thrift_and_antlr by this push:
new 4011305 remove stale files
4011305 is described below
commit 40113056c228af009364d4f47a934d836566f4dd
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Thu Jul 2 14:51:27 2020 +0800
remove stale files
---
.../org/apache/iotdb/db/qp/strategy/SqlBase.g4 | 1194 --------------------
service-rpc/src/main/thrift/cluster.thrift | 387 -------
service-rpc/src/main/thrift/rpc.thrift | 312 -----
service-rpc/src/main/thrift/sync.thrift | 50 -
4 files changed, 1943 deletions(-)
diff --git a/server/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4 b/server/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
deleted file mode 100644
index e9ae14e..0000000
--- a/server/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
+++ /dev/null
@@ -1,1194 +0,0 @@
-/*
- * 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.
- */
-
-grammar SqlBase;
-
-singleStatement
- : statement EOF
- ;
-
-statement
- : CREATE TIMESERIES fullPath alias? WITH attributeClauses #createTimeseries
- | DELETE TIMESERIES prefixPath (COMMA prefixPath)* #deleteTimeseries
- | ALTER TIMESERIES fullPath alterClause #alterTimeseries
- | INSERT INTO fullPath insertColumnSpec VALUES insertValuesSpec #insertStatement
- | UPDATE prefixPath setClause whereClause? #updateStatement
- | DELETE FROM prefixPath (COMMA prefixPath)* (whereClause)? #deleteStatement
- | SET STORAGE GROUP TO fullPath #setStorageGroup
- | DELETE STORAGE GROUP fullPath (COMMA fullPath)* #deleteStorageGroup
- | SHOW METADATA #showMetadata // not support yet
- | DESCRIBE prefixPath #describePath // not support yet
- | CREATE INDEX ON fullPath USING function=ID indexWithClause? whereClause? #createIndex //not support yet
- | DROP INDEX function=ID ON fullPath #dropIndex //not support yet
- | MERGE #merge
- | FLUSH prefixPath? (COMMA prefixPath)* (booleanClause)?#flush
- | FULL MERGE #fullMerge
- | CLEAR CACHE #clearcache
- | CREATE USER userName=ID password=STRING_LITERAL #createUser
- | ALTER USER userName=(ROOT|ID) SET PASSWORD password=STRING_LITERAL #alterUser
- | DROP USER userName=ID #dropUser
- | CREATE ROLE roleName=ID #createRole
- | DROP ROLE roleName=ID #dropRole
- | GRANT USER userName=ID PRIVILEGES privileges ON prefixPath #grantUser
- | GRANT ROLE roleName=ID PRIVILEGES privileges ON prefixPath #grantRole
- | REVOKE USER userName=ID PRIVILEGES privileges ON prefixPath #revokeUser
- | REVOKE ROLE roleName=ID PRIVILEGES privileges ON prefixPath #revokeRole
- | GRANT roleName=ID TO userName=ID #grantRoleToUser
- | REVOKE roleName = ID FROM userName = ID #revokeRoleFromUser
- | LOAD TIMESERIES (fileName=STRING_LITERAL) prefixPath #loadStatement
- | GRANT WATERMARK_EMBEDDING TO rootOrId (COMMA rootOrId)* #grantWatermarkEmbedding
- | REVOKE WATERMARK_EMBEDDING FROM rootOrId (COMMA rootOrId)* #revokeWatermarkEmbedding
- | LIST USER #listUser
- | LIST ROLE #listRole
- | LIST PRIVILEGES USER username=ID ON prefixPath #listPrivilegesUser
- | LIST PRIVILEGES ROLE roleName=ID ON prefixPath #listPrivilegesRole
- | LIST USER PRIVILEGES username = ID #listUserPrivileges
- | LIST ROLE PRIVILEGES roleName = ID #listRolePrivileges
- | LIST ALL ROLE OF USER username = ID #listAllRoleOfUser
- | LIST ALL USER OF ROLE roleName = ID #listAllUserOfRole
- | SET TTL TO path=prefixPath time=INT #setTTLStatement
- | UNSET TTL TO path=prefixPath #unsetTTLStatement
- | SHOW TTL ON prefixPath (COMMA prefixPath)* #showTTLStatement
- | SHOW ALL TTL #showAllTTLStatement
- | SHOW FLUSH TASK INFO #showFlushTaskInfo
- | SHOW DYNAMIC PARAMETER #showDynamicParameter
- | SHOW VERSION #showVersion
- | SHOW LATEST? TIMESERIES prefixPath? showWhereClause? limitClause? #showTimeseries
- | SHOW STORAGE GROUP #showStorageGroup
- | SHOW CHILD PATHS prefixPath? #showChildPaths
- | SHOW DEVICES prefixPath? #showDevices
- | SHOW MERGE #showMergeStatus
- | TRACING ON #tracingOn
- | TRACING OFF #tracingOff
- | COUNT TIMESERIES prefixPath? (GROUP BY LEVEL OPERATOR_EQ INT)? #countTimeseries
- | COUNT NODES prefixPath LEVEL OPERATOR_EQ INT #countNodes
- | LOAD CONFIGURATION (MINUS GLOBAL)? #loadConfigurationStatement
- | LOAD STRING_LITERAL autoCreateSchema? #loadFiles
- | REMOVE STRING_LITERAL #removeFile
- | MOVE STRING_LITERAL STRING_LITERAL #moveFile
- | DELETE PARTITION prefixPath INT(COMMA INT)* #deletePartition
- | CREATE SNAPSHOT FOR SCHEMA #createSnapshot
- | SELECT INDEX func=ID //not support yet
- LR_BRACKET
- p1=fullPath COMMA p2=fullPath COMMA n1=timeValue COMMA n2=timeValue COMMA
- epsilon=constant (COMMA alpha=constant COMMA beta=constant)?
- RR_BRACKET
- fromClause
- whereClause?
- specialClause? #selectIndexStatement
- | SELECT selectElements
- fromClause
- whereClause?
- specialClause? #selectStatement
- ;
-
-selectElements
- : functionCall (COMMA functionCall)* #functionElement
- | suffixPath (COMMA suffixPath)* #selectElement
- | STRING_LITERAL (COMMA STRING_LITERAL)* #selectConstElement
- | lastClause #lastElement
- ;
-
-functionCall
- : functionName LR_BRACKET suffixPath RR_BRACKET
- ;
-
-functionName
- : MIN_TIME
- | MAX_TIME
- | MIN_VALUE
- | MAX_VALUE
- | COUNT
- | AVG
- | FIRST_VALUE
- | SUM
- | LAST_VALUE
- ;
-
-lastClause
- : LAST suffixPath (COMMA suffixPath)*
- ;
-
-alias
- : LR_BRACKET ID RR_BRACKET
- ;
-
-alterClause
- : RENAME beforeName=ID TO currentName=ID
- | SET property (COMMA property)*
- | DROP ID (COMMA ID)*
- | ADD TAGS property (COMMA property)*
- | ADD ATTRIBUTES property (COMMA property)*
- | UPSERT aliasClause tagClause attributeClause
- ;
-
-aliasClause
- : (ALIAS OPERATOR_EQ ID)?
- ;
-
-attributeClauses
- : DATATYPE OPERATOR_EQ dataType COMMA ENCODING OPERATOR_EQ encoding
- (COMMA (COMPRESSOR | COMPRESSION) OPERATOR_EQ compressor)?
- (COMMA property)*
- tagClause
- attributeClause
- ;
-
-compressor
- : UNCOMPRESSED
- | SNAPPY
- | GZIP
- | LZO
- | SDT
- | PAA
- | PLA
- ;
-
-attributeClause
- : (ATTRIBUTES LR_BRACKET property (COMMA property)* RR_BRACKET)?
- ;
-
-tagClause
- : (TAGS LR_BRACKET property (COMMA property)* RR_BRACKET)?
- ;
-
-setClause
- : SET setCol (COMMA setCol)*
- ;
-
-whereClause
- : WHERE orExpression
- ;
-
-showWhereClause
- : WHERE (property | containsExpression)
- ;
-containsExpression
- : name=ID OPERATOR_CONTAINS value=propertyValue
- ;
-
-orExpression
- : andExpression (OPERATOR_OR andExpression)*
- ;
-
-andExpression
- : predicate (OPERATOR_AND predicate)*
- ;
-
-predicate
- : (TIME | TIMESTAMP | suffixPath | fullPath) comparisonOperator constant
- | (TIME | TIMESTAMP | suffixPath | fullPath) inClause
- | OPERATOR_NOT? LR_BRACKET orExpression RR_BRACKET
- ;
-
-inClause
- : OPERATOR_NOT? OPERATOR_IN LR_BRACKET constant (COMMA constant)* RR_BRACKET
- ;
-
-fromClause
- : FROM prefixPath (COMMA prefixPath)*
- ;
-
-specialClause
- : specialLimit
- | groupByTimeClause specialLimit?
- | groupByFillClause
- | fillClause slimitClause? alignByDeviceClauseOrDisableAlign?
- | alignByDeviceClauseOrDisableAlign
- | groupByLevelClause specialLimit?
- ;
-
-specialLimit
- : limitClause slimitClause? alignByDeviceClauseOrDisableAlign?
- | slimitClause limitClause? alignByDeviceClauseOrDisableAlign?
- | alignByDeviceClauseOrDisableAlign
- ;
-
-limitClause
- : LIMIT INT offsetClause?
- | offsetClause? LIMIT INT
- ;
-
-offsetClause
- : OFFSET INT
- ;
-
-slimitClause
- : SLIMIT INT soffsetClause?
- | soffsetClause? SLIMIT INT
- ;
-
-soffsetClause
- : SOFFSET INT
- ;
-
-alignByDeviceClause
- : ALIGN BY DEVICE
- | GROUP BY DEVICE
- ;
-
-disableAlign
- : DISABLE ALIGN
- ;
-
-alignByDeviceClauseOrDisableAlign
- : alignByDeviceClause
- | disableAlign
- ;
-
-fillClause
- : FILL LR_BRACKET typeClause (COMMA typeClause)* RR_BRACKET
- ;
-
-groupByTimeClause
- : GROUP BY LR_BRACKET
- timeInterval
- COMMA DURATION
- (COMMA DURATION)?
- RR_BRACKET
- | GROUP BY LR_BRACKET
- timeInterval
- COMMA DURATION
- (COMMA DURATION)?
- RR_BRACKET
- COMMA LEVEL OPERATOR_EQ INT
- ;
-
-groupByFillClause
- : GROUP BY LR_BRACKET
- timeInterval
- COMMA DURATION
- RR_BRACKET
- FILL LR_BRACKET typeClause (COMMA typeClause)* RR_BRACKET
- ;
-
-groupByLevelClause
- : GROUP BY LEVEL OPERATOR_EQ INT
- ;
-
-typeClause
- : dataType LS_BRACKET linearClause RS_BRACKET
- | dataType LS_BRACKET previousClause RS_BRACKET
- | dataType LS_BRACKET previousUntilLastClause RS_BRACKET
- ;
-
-linearClause
- : LINEAR (COMMA aheadDuration=DURATION COMMA behindDuration=DURATION)?
- ;
-
-previousClause
- : PREVIOUS (COMMA DURATION)?
- ;
-
-previousUntilLastClause
- : PREVIOUSUNTILLAST (COMMA DURATION)?
- ;
-
-indexWithClause
- : WITH indexValue (COMMA indexValue)?
- ;
-
-indexValue
- : ID OPERATOR_EQ INT
- ;
-
-
-comparisonOperator
- : type = OPERATOR_GT
- | type = OPERATOR_GTE
- | type = OPERATOR_LT
- | type = OPERATOR_LTE
- | type = OPERATOR_EQ
- | type = OPERATOR_NEQ
- ;
-
-insertColumnSpec
- : LR_BRACKET (TIMESTAMP|TIME) (COMMA nodeNameWithoutStar)* RR_BRACKET
- ;
-
-insertValuesSpec
- : LR_BRACKET dateFormat (COMMA constant)* RR_BRACKET
- | LR_BRACKET INT (COMMA constant)* RR_BRACKET
- ;
-
-setCol
- : suffixPath OPERATOR_EQ constant
- ;
-
-privileges
- : STRING_LITERAL (COMMA STRING_LITERAL)*
- ;
-
-rootOrId
- : ROOT
- | ID
- ;
-
-timeInterval
- : LS_BRACKET startTime=timeValue COMMA endTime=timeValue RR_BRACKET
- | LR_BRACKET startTime=timeValue COMMA endTime=timeValue RS_BRACKET
- ;
-
-timeValue
- : dateFormat
- | dateExpression
- | INT
- ;
-
-propertyValue
- : INT
- | ID
- | STRING_LITERAL
- | constant
- ;
-
-fullPath
- : ROOT (DOT nodeNameWithoutStar)*
- ;
-
-prefixPath
- : ROOT (DOT nodeName)*
- ;
-
-suffixPath
- : nodeName (DOT nodeName)*
- ;
-
-nodeName
- : ID
- | STAR
- | STRING_LITERAL
- | ID STAR
- | DURATION
- | encoding
- | dataType
- | dateExpression
- | MINUS? EXPONENT
- | MINUS? INT
- | booleanClause
- | (ID | OPERATOR_IN)? LS_BRACKET ID? RS_BRACKET ID?
- | compressor
- ;
-
-nodeNameWithoutStar
- : ID
- | STRING_LITERAL
- | DURATION
- | encoding
- | dataType
- | dateExpression
- | MINUS? EXPONENT
- | MINUS? INT
- | booleanClause
- | (ID | OPERATOR_IN)? LS_BRACKET ID? RS_BRACKET ID?
- | compressor
- ;
-
-dataType
- : INT32 | INT64 | FLOAT | DOUBLE | BOOLEAN | TEXT | ALL
- ;
-
-dateFormat
- : DATETIME
- | NOW LR_BRACKET RR_BRACKET
- ;
-
-constant
- : dateExpression
- | NaN
- | MINUS? realLiteral
- | MINUS? INT
- | STRING_LITERAL
- | booleanClause
- ;
-
-booleanClause
- : TRUE
- | FALSE
- ;
-
-dateExpression
- : dateFormat ((PLUS | MINUS) DURATION)*
- ;
-
-encoding
- : PLAIN | PLAIN_DICTIONARY | RLE | DIFF | TS_2DIFF | GORILLA | REGULAR
- ;
-
-realLiteral
- : INT DOT (INT | EXPONENT)?
- | DOT (INT|EXPONENT)
- | EXPONENT
- ;
-
-property
- : name=ID OPERATOR_EQ value=propertyValue
- ;
-
-autoCreateSchema
- : booleanClause
- | booleanClause INT
- ;
-
-//============================
-// Start of the keywords list
-//============================
-CREATE
- : C R E A T E
- ;
-
-INSERT
- : I N S E R T
- ;
-
-UPDATE
- : U P D A T E
- ;
-
-DELETE
- : D E L E T E
- ;
-
-SELECT
- : S E L E C T
- ;
-
-SHOW
- : S H O W
- ;
-
-GRANT
- : G R A N T
- ;
-
-INTO
- : I N T O
- ;
-
-SET
- : S E T
- ;
-
-WHERE
- : W H E R E
- ;
-
-FROM
- : F R O M
- ;
-
-TO
- : T O
- ;
-
-BY
- : B Y
- ;
-
-DEVICE
- : D E V I C E
- ;
-
-CONFIGURATION
- : C O N F I G U R A T I O N
- ;
-
-DESCRIBE
- : D E S C R I B E
- ;
-
-SLIMIT
- : S L I M I T
- ;
-
-LIMIT
- : L I M I T
- ;
-
-UNLINK
- : U N L I N K
- ;
-
-OFFSET
- : O F F S E T
- ;
-
-SOFFSET
- : S O F F S E T
- ;
-
-FILL
- : F I L L
- ;
-
-LINEAR
- : L I N E A R
- ;
-
-PREVIOUS
- : P R E V I O U S
- ;
-
-PREVIOUSUNTILLAST
- : P R E V I O U S U N T I L L A S T
- ;
-
-METADATA
- : M E T A D A T A
- ;
-
-TIMESERIES
- : T I M E S E R I E S
- ;
-
-TIMESTAMP
- : T I M E S T A M P
- ;
-
-PROPERTY
- : P R O P E R T Y
- ;
-
-WITH
- : W I T H
- ;
-
-ROOT
- : R O O T
- ;
-
-DATATYPE
- : D A T A T Y P E
- ;
-
-COMPRESSOR
- : C O M P R E S S O R
- ;
-
-STORAGE
- : S T O R A G E
- ;
-
-GROUP
- : G R O U P
- ;
-
-LABEL
- : L A B E L
- ;
-
-INT32
- : I N T '3' '2'
- ;
-
-INT64
- : I N T '6' '4'
- ;
-
-FLOAT
- : F L O A T
- ;
-
-DOUBLE
- : D O U B L E
- ;
-
-BOOLEAN
- : B O O L E A N
- ;
-
-TEXT
- : T E X T
- ;
-
-ENCODING
- : E N C O D I N G
- ;
-
-PLAIN
- : P L A I N
- ;
-
-PLAIN_DICTIONARY
- : P L A I N '_' D I C T I O N A R Y
- ;
-
-RLE
- : R L E
- ;
-
-DIFF
- : D I F F
- ;
-
-TS_2DIFF
- : T S '_' '2' D I F F
- ;
-
-GORILLA
- : G O R I L L A
- ;
-
-
-REGULAR
- : R E G U L A R
- ;
-
-BITMAP
- : B I T M A P
- ;
-
-ADD
- : A D D
- ;
-
-UPSERT
- : U P S E R T
- ;
-
-ALIAS
- : A L I A S
- ;
-
-VALUES
- : V A L U E S
- ;
-
-NOW
- : N O W
- ;
-
-LINK
- : L I N K
- ;
-
-INDEX
- : I N D E X
- ;
-
-USING
- : U S I N G
- ;
-
-TRACING
- : T R A C I N G
- ;
-
-ON
- : O N
- ;
-
-OFF
- : O F F
- ;
-
-DROP
- : D R O P
- ;
-
-MERGE
- : M E R G E
- ;
-
-LIST
- : L I S T
- ;
-
-USER
- : U S E R
- ;
-
-PRIVILEGES
- : P R I V I L E G E S
- ;
-
-ROLE
- : R O L E
- ;
-
-ALL
- : A L L
- ;
-
-OF
- : O F
- ;
-
-ALTER
- : A L T E R
- ;
-
-PASSWORD
- : P A S S W O R D
- ;
-
-REVOKE
- : R E V O K E
- ;
-
-LOAD
- : L O A D
- ;
-
-WATERMARK_EMBEDDING
- : W A T E R M A R K '_' E M B E D D I N G
- ;
-
-UNSET
- : U N S E T
- ;
-
-TTL
- : T T L
- ;
-
-FLUSH
- : F L U S H
- ;
-
-TASK
- : T A S K
- ;
-
-INFO
- : I N F O
- ;
-
-DYNAMIC
- : D Y N A M I C
- ;
-
-PARAMETER
- : P A R A M E T E R
- ;
-
-
-VERSION
- : V E R S I O N
- ;
-
-REMOVE
- : R E M O V E
- ;
-MOVE
- : M O V E
- ;
-
-CHILD
- : C H I L D
- ;
-
-PATHS
- : P A T H S
- ;
-
-DEVICES
- : D E V I C E S
- ;
-
-COUNT
- : C O U N T
- ;
-
-NODES
- : N O D E S
- ;
-
-LEVEL
- : L E V E L
- ;
-
-MIN_TIME
- : M I N UNDERLINE T I M E
- ;
-
-MAX_TIME
- : M A X UNDERLINE T I M E
- ;
-
-MIN_VALUE
- : M I N UNDERLINE V A L U E
- ;
-
-MAX_VALUE
- : M A X UNDERLINE V A L U E
- ;
-
-AVG
- : A V G
- ;
-
-FIRST_VALUE
- : F I R S T UNDERLINE V A L U E
- ;
-
-SUM
- : S U M
- ;
-
-LAST_VALUE
- : L A S T UNDERLINE V A L U E
- ;
-
-LAST
- : L A S T
- ;
-
-DISABLE
- : D I S A B L E
- ;
-
-ALIGN
- : A L I G N
- ;
-
-COMPRESSION
- : C O M P R E S S I O N
- ;
-
-TIME
- : T I M E
- ;
-
-ATTRIBUTES
- : A T T R I B U T E S
- ;
-
-TAGS
- : T A G S
- ;
-
-RENAME
- : R E N A M E
- ;
-
-GLOBAL
- : G L O B A L
- | G
- ;
-
-FULL
- : F U L L
- ;
-
-CLEAR
- : C L E A R
- ;
-
-CACHE
- : C A C H E
- ;
-
-TRUE
- : T R U E
- ;
-
-FALSE
- : F A L S E
- ;
-
-UNCOMPRESSED
- : U N C O M P R E S S E D
- ;
-
-SNAPPY
- : S N A P P Y
- ;
-
-GZIP
- : G Z I P
- ;
-
-LZO
- : L Z O
- ;
-
-SDT
- : S D T
- ;
-
-PAA
- : P A A
- ;
-
-PLA
- : P L A
- ;
-
-LATEST
- : L A T E S T
- ;
-
-PARTITION
- : P A R T I T I O N
- ;
-
-SNAPSHOT
- : S N A P S H O T
- ;
-
-FOR
- : F O R
- ;
-
-SCHEMA
- : S C H E M A
- ;
-
-//============================
-// End of the keywords list
-//============================
-COMMA : ',';
-
-STAR : '*';
-
-OPERATOR_EQ : '=' | '==';
-
-OPERATOR_GT : '>';
-
-OPERATOR_GTE : '>=';
-
-OPERATOR_LT : '<';
-
-OPERATOR_LTE : '<=';
-
-OPERATOR_NEQ : '!=' | '<>';
-
-OPERATOR_IN : I N;
-
-OPERATOR_AND
- : A N D
- | '&'
- | '&&'
- ;
-
-OPERATOR_OR
- : O R
- | '|'
- | '||'
- ;
-
-OPERATOR_NOT
- : N O T | '!'
- ;
-
-OPERATOR_CONTAINS
- : C O N T A I N S
- ;
-
-MINUS : '-';
-
-PLUS : '+';
-
-DOT : '.';
-
-LR_BRACKET : '(';
-
-RR_BRACKET : ')';
-
-LS_BRACKET : '[';
-
-RS_BRACKET : ']';
-
-L_BRACKET : '{';
-
-R_BRACKET : '}';
-
-UNDERLINE : '_';
-
-NaN : 'NaN';
-
-STRING_LITERAL
- : DOUBLE_QUOTE_STRING_LITERAL
- | SINGLE_QUOTE_STRING_LITERAL
- ;
-
-INT : [0-9]+;
-
-EXPONENT : INT ('e'|'E') ('+'|'-')? INT ;
-
-DURATION
- :
- (INT+ (Y|M O|W|D|H|M|S|M S|U S|N S))+
- ;
-
-DATETIME
- : INT ('-'|'/') INT ('-'|'/') INT
- ((T | WS)
- INT ':' INT ':' INT (DOT INT)?
- (('+' | '-') INT ':' INT)?)?
- ;
-
-/** Allow unicode rule/token names */
-ID : FIRST_NAME_CHAR NAME_CHAR*;
-
-fragment
-NAME_CHAR
- : 'A'..'Z'
- | 'a'..'z'
- | '0'..'9'
- | '_'
- | '-'
- | ':'
- | '/'
- | '@'
- | '#'
- | '$'
- | '%'
- | '&'
- | '+'
- | CN_CHAR
- ;
-
-fragment
-FIRST_NAME_CHAR
- : 'A'..'Z'
- | 'a'..'z'
- | '0'..'9'
- | '_'
- | '/'
- | '@'
- | '#'
- | '$'
- | '%'
- | '&'
- | '+'
- | CN_CHAR
- ;
-
-fragment CN_CHAR
- : '\u2E80'..'\u9FFF'
- ;
-
-fragment DOUBLE_QUOTE_STRING_LITERAL
- : '"' ('\\' . | ~'"' )*? '"'
- ;
-
-fragment SINGLE_QUOTE_STRING_LITERAL
- : '\'' ('\\' . | ~'\'' )*? '\''
- ;
-
-//Characters and write it this way for case sensitivity
-fragment A
- : 'a' | 'A'
- ;
-
-fragment B
- : 'b' | 'B'
- ;
-
-fragment C
- : 'c' | 'C'
- ;
-
-fragment D
- : 'd' | 'D'
- ;
-
-fragment E
- : 'e' | 'E'
- ;
-
-fragment F
- : 'f' | 'F'
- ;
-
-fragment G
- : 'g' | 'G'
- ;
-
-fragment H
- : 'h' | 'H'
- ;
-
-fragment I
- : 'i' | 'I'
- ;
-
-fragment J
- : 'j' | 'J'
- ;
-
-fragment K
- : 'k' | 'K'
- ;
-
-fragment L
- : 'l' | 'L'
- ;
-
-fragment M
- : 'm' | 'M'
- ;
-
-fragment N
- : 'n' | 'N'
- ;
-
-fragment O
- : 'o' | 'O'
- ;
-
-fragment P
- : 'p' | 'P'
- ;
-
-fragment Q
- : 'q' | 'Q'
- ;
-
-fragment R
- : 'r' | 'R'
- ;
-
-fragment S
- : 's' | 'S'
- ;
-
-fragment T
- : 't' | 'T'
- ;
-
-fragment U
- : 'u' | 'U'
- ;
-
-fragment V
- : 'v' | 'V'
- ;
-
-fragment W
- : 'w' | 'W'
- ;
-
-fragment X
- : 'x' | 'X'
- ;
-
-fragment Y
- : 'y' | 'Y'
- ;
-
-fragment Z
- : 'z' | 'Z'
- ;
-
-WS
- : [ \r\n\t]+ -> channel(HIDDEN)
- ;
\ No newline at end of file
diff --git a/service-rpc/src/main/thrift/cluster.thrift b/service-rpc/src/main/thrift/cluster.thrift
deleted file mode 100644
index b59bee8..0000000
--- a/service-rpc/src/main/thrift/cluster.thrift
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * 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.
- */
-
-include "rpc.thrift"
-namespace java org.apache.iotdb.cluster.rpc.thrift
-
-typedef i32 int
-typedef i16 short
-typedef i64 long
-
-// TODO-Cluster: update rpc change list when ready to merge
-// leader -> follower
-struct HeartBeatRequest {
- 1: required long term // leader's meta log
- 2: required long commitLogIndex // leader's meta log
- 3: required long commitLogTerm
- 4: required Node leader
- // if the leader does not know the follower's id, and require it reports to the leader, then true
- 5: required bool requireIdentifier
- 6: required bool regenerateIdentifier //if the leader finds the follower's id is conflicted,
- // then true
- // serialized partitionTable
- 7: optional binary partitionTableBytes
-
- // because a data server may play many data groups members, this is used to identify which
- // member should process the request or response. Only used in data group communication.
- 8: optional Node header
-}
-
-// follower -> leader
-struct HeartBeatResponse {
- 1: required long term
- 2: optional long lastLogIndex // follower's meta log
- 3: optional long lastLogTerm // follower's meta log
- // used to perform a catch up when necessary
- 4: optional Node follower
- 5: optional int followerIdentifier
- 6: required bool requirePartitionTable
-
- // because a data server may play many data groups members, this is used to identify which
- // member should process the request or response. Only used in data group communication.
- 7: optional Node header
-}
-
-// node -> node
-struct ElectionRequest {
- 1: required long term
- 2: required long lastLogTerm
- 3: required long lastLogIndex
- 4: required Node elector
-
- // because a data server may play many data groups members, this is used to identify which
- // member should process the request or response. Only used in data group communication.
- 5: optional Node header
- 6: optional long dataLogLastIndex
- 7: optional long dataLogLastTerm
-}
-
-// leader -> follower
-struct AppendEntryRequest {
- 1: required long term // leader's
- 2: required Node leader
- 3: required long prevLogIndex
- 4: required long prevLogTerm
- 5: required long leaderCommit
- 6: required binary entry // data
-
- // because a data server may play many data groups members, this is used to identify which
- // member should process the request or response. Only used in data group communication.
- 7: optional Node header
-}
-
-// leader -> follower
-struct AppendEntriesRequest {
- 1: required long term // leader's
- 2: required Node leader
- 3: required list<binary> entries // data
- 4: required long prevLogIndex
- 5: required long prevLogTerm
- 6: required long leaderCommit
-
- // because a data server may play many data groups members, this is used to identify which
- // member should process the request or response. Only used in data group communication.
- 7: optional Node header
-}
-
-struct AddNodeResponse {
- // -1: accept to add new node or the node is already in this cluster, otherwise: fail to
- // add new node
- 1: required int respNum
- 2: optional binary partitionTableBytes
- 3: optional CheckStatusResponse checkStatusResponse
-}
-
-struct Node {
- 1: required string ip
- 2: required int metaPort
- 3: required int nodeIdentifier
- 4: required int dataPort
-}
-
-// leader -> follower
-struct StartUpStatus {
- 1: required long partitionInterval
- 2: required int hashSalt
- 3: required int replicationNumber
-}
-
-// follower -> leader
-struct CheckStatusResponse {
- 1: required bool partitionalIntervalEquals
- 2: required bool hashSaltEquals
- 3: required bool replicationNumEquals
-}
-
-struct SendSnapshotRequest {
- 1: required binary snapshotBytes
- // for data group
- 2: optional Node header
-}
-
-struct PullSnapshotRequest {
- 1: required list<int> requiredSlots
- // for data group
- 2: optional Node header
- // set to true if the previous holder has been removed from the cluster.
- // This will make the previous holder read-only so that different new
- // replicas can pull the same snapshot.
- 3: required bool requireReadOnly
-}
-
-struct PullSnapshotResp {
- 1: optional map<int, binary> snapshotBytes
-}
-
-struct ExecutNonQueryReq {
- 1: required binary planBytes
- 2: optional Node header
-}
-
-struct PullSchemaRequest {
- 1: required list<string> prefixPaths
- 2: optional Node header
-}
-
-struct PullSchemaResp {
- 1: required binary schemaBytes
-}
-
-struct SingleSeriesQueryRequest {
- 1: required string path
- 2: optional binary timeFilterBytes
- 3: optional binary valueFilterBytes
- 4: required long queryId
- 5: required Node requester
- 6: required Node header
- 7: required int dataTypeOrdinal
- 8: required set<string> deviceMeasurements
-}
-
-struct PreviousFillRequest {
- 1: required string path
- 2: required long queryTime
- 3: required long beforeRange
- 4: required long queryId
- 5: required Node requester
- 6: required Node header
- 7: required int dataTypeOrdinal
- 8: required set<string> deviceMeasurements
-}
-
-// the spec and load of a node, for query coordinating
-struct TNodeStatus {
-
-}
-
-struct GetAggrResultRequest {
- 1: required string path
- 2: required list<string> aggregations
- 3: required int dataTypeOrdinal
- 4: optional binary timeFilterBytes
- 5: required Node header
- 6: required long queryId
- 7: required Node requestor
- 8: required set<string> deviceMeasurements
-}
-
-struct GroupByRequest {
- 1: required string path
- 2: required int dataTypeOrdinal
- 3: optional binary timeFilterBytes
- 4: required long queryId
- 5: required list<int> aggregationTypeOrdinals
- 6: required Node header
- 7: required Node requestor
- 8: required set<string> deviceMeasurements
-}
-
-service RaftService {
- /**
- * Leader will call this method to all followers to ensure its authority.
- * <br>For the receiver,
- * The method will check the authority of the leader.
- *
- * @param request information of the leader
- * @return if the leader is valid, HeartBeatResponse.term will set -1, and the follower will tell
- * leader its lastLogIndex; otherwise, the follower will tell the fake leader its term.
- **/
- HeartBeatResponse sendHeartbeat(1:HeartBeatRequest request);
-
- /**
- * If a node wants to be a leader, it'll call the method to other nodes to get a vote.
- * <br>For the receiver,
- * The method will check whether the node can be a leader.
- *
- * @param voteRequest a candidate that wants to be a leader.
- * @return -1 means agree, otherwise return the voter's term
- **/
- long startElection(1:ElectionRequest request);
-
- /**
- * Leader will call this method to send a batch of entries to all followers.
- * <br>For the receiver,
- * The method will check the authority of the leader and if the local log is complete.
- * If the leader is valid and local log is complete, the follower will append these entries to local log.
- *
- * @param request entries that need to be appended and the information of the leader.
- * @return -1: agree, -2: log index mismatch , otherwise return the follower's term
- **/
- long appendEntries(1:AppendEntriesRequest request)
-
- /**
- * Leader will call this method to send a entry to all followers.
- * <br>For the receiver,
- * The method will check the authority of the leader and if the local log is complete.
- * If the leader is valid and local log is complete, the follower will append the entry to local log.
- *
- * @param request entry that needs to be appended and the information of the leader.
- * @return -1: agree, -2: log index mismatch , otherwise return the follower's term
- **/
- long appendEntry(1:AppendEntryRequest request)
-
- void sendSnapshot(1:SendSnapshotRequest request)
-
- /**
- * Execute a binarized non-query PhysicalPlan
- **/
- rpc.TSStatus executeNonQueryPlan(1:ExecutNonQueryReq request)
-
- /**
- * Ask the leader for its commit index, used to check whether the node has caught up with the
- * leader.
- **/
- long requestCommitIndex(1:Node header)
-
- binary readFile(1:string filePath, 2:i64 offset, 3:i32 length)
-}
-
-
-
-service TSDataService extends RaftService {
-
- /**
- * Query a time series without value filter.
- * @return a readerId >= 0 if the query succeeds, otherwise the query fails
- * TODO-Cluster: support query multiple series in a request
- **/
- long querySingleSeries(1:SingleSeriesQueryRequest request)
-
- /**
- * Fetch at max fetchSize time-value pairs using the resultSetId generated by querySingleSeries.
- * @return a ByteBuffer containing the serialized time-value pairs or an empty buffer if there
- * are not more results.
- **/
- binary fetchSingleSeries(1:Node header, 2:long readerId)
-
- /**
- * Query a time series and generate an IReaderByTimestamp.
- * @return a readerId >= 0 if the query succeeds, otherwise the query fails
- **/
- long querySingleSeriesByTimestamp(1:SingleSeriesQueryRequest request)
-
- /**
- * Fetch one value at given timestamp using the resultSetId generated by
- * querySingleSeriesByTimestamp.
- * @return a ByteBuffer containing the serialized value or an empty buffer if there
- * are not more results.
- **/
- binary fetchSingleSeriesByTimestamp(1:Node header, 2:long readerId, 3:long timestamp)
-
- /**
- * Find the local query established for the remote query and release all its resource.
- **/
- void endQuery(1:Node header, 2:Node thisNode, 3:long queryId)
-
- /**
- * Given path patterns (paths with wildcard), return all paths they match.
- **/
- list<string> getAllPaths(1:Node header, 2:list<string> path)
-
- /**
- * Given path patterns (paths with wildcard), return all devices they match.
- **/
- set<string> getAllDevices(1:Node header, 2:list<string> path)
-
- list<string> getNodeList(1:Node header, 2:string path, 3:int nodeLevel)
-
- set<string> getChildNodePathInNextLevel(1: Node header, 2: string path)
-
- binary getAllMeasurementSchema(1: Node header, 2: binary planBinary)
-
-
- list<binary> getAggrResult(1:GetAggrResultRequest request)
-
- PullSnapshotResp pullSnapshot(1:PullSnapshotRequest request)
-
- /**
- * Create a GroupByExecutor for a path, executing the given aggregations.
- * @return the executorId
- **/
- long getGroupByExecutor(1:GroupByRequest request)
-
- /**
- * Fetch the group by result in the interval [startTime, endTime) from the given executor.
- * @return the serialized AggregationResults, each is the result of one of the previously
- * required aggregations, and their orders are the same.
- **/
- list<binary> getGroupByResult(1:Node header, 2:long executorId, 3:long startTime, 4:long endTime)
-
-
- /**
- * Pull all timeseries schemas prefixed by a given path.
- **/
- PullSchemaResp pullTimeSeriesSchema(1: PullSchemaRequest request)
-
- /**
- * Perform a previous fill and return the timevalue pair in binary.
- **/
- binary previousFill(1: PreviousFillRequest request)
-}
-
-service TSMetaService extends RaftService {
- /**
- * Node which is not leader will call this method to try to add itself into the cluster as a new node.
- * <br>For the receiver,
- * If the local node is leader, it'll check whether the cluster can add this new node;
- * otherwise, the local node will transfer the request to the leader.
- *
- * @param node a new node that needs to be added
- **/
- AddNodeResponse addNode(1: Node node, 2: StartUpStatus startUpStatus)
-
- /**
- * Remove a node from the cluster. If the node is not in the cluster or the cluster size will
- * less than replication number, the request will be rejected.
- * return -1(RESPONSE_AGREE) or -3(RESPONSE_REJECT) or -9(RESPONSE_CLUSTER_TOO_SMALL)
- **/
- long removeNode(1: Node node)
-
- /**
- * When a node is removed from the cluster, if it is not the meta leader, it cannot receive
- * the commit command by heartbeat since it has been removed, so the leader should tell it
- * directly that it is no longer in the cluster.
- **/
- void exile()
-
- TNodeStatus queryNodeStatus()
-
- Node checkAlive()
-
-}
diff --git a/service-rpc/src/main/thrift/rpc.thrift b/service-rpc/src/main/thrift/rpc.thrift
deleted file mode 100644
index 64cb9ee..0000000
--- a/service-rpc/src/main/thrift/rpc.thrift
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * 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.
- */
-namespace java org.apache.iotdb.service.rpc.thrift
-
-// The return status code and message in each response.
-struct TSStatus {
- 1: required i32 code
- 2: optional string message
- 3: optional list<TSStatus> subStatus
-}
-
-struct TSExecuteStatementResp {
- 1: required TSStatus status
- 2: optional i64 queryId
- // Column names in select statement of SQL
- 3: optional list<string> columns
- 4: optional string operationType
- 5: optional bool ignoreTimeStamp
- // Data type list of columns in select statement of SQL
- 6: optional list<string> dataTypeList
- 7: optional TSQueryDataSet queryDataSet
- // for disable align statements, queryDataSet is null and nonAlignQueryDataSet is not null
- 8: optional TSQueryNonAlignDataSet nonAlignQueryDataSet
- 9: optional map<string, i32> columnNameIndexMap
-}
-
-enum TSProtocolVersion {
- IOTDB_SERVICE_PROTOCOL_V1,
- IOTDB_SERVICE_PROTOCOL_V2,//V2 is the first version that we can check version compatibility
- IOTDB_SERVICE_PROTOCOL_V3,//V3 is incompatible with V2
-}
-
-struct TSOpenSessionResp {
- 1: required TSStatus status
-
- // The protocol version that the server is using.
- 2: required TSProtocolVersion serverProtocolVersion = TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V1
-
- // Session id
- 3: optional i64 sessionId
-
- // The configuration settings for this session.
- 4: optional map<string, string> configuration
-}
-
-// OpenSession()
-// Open a session (connection) on the server against which operations may be executed.
-struct TSOpenSessionReq {
- 1: required TSProtocolVersion client_protocol = TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V3
- 2: optional string username
- 3: optional string password
- 4: optional map<string, string> configuration
-}
-
-// CloseSession()
-// Closes the specified session and frees any resources currently allocated to that session.
-// Any open operations in that session will be canceled.
-struct TSCloseSessionReq {
- 1: required i64 sessionId
-}
-
-// ExecuteStatement()
-//
-// Execute a statement.
-// The returned OperationHandle can be used to check on the status of the statement, and to fetch results once the
-// statement has finished executing.
-struct TSExecuteStatementReq {
- // The session to execute the statement against
- 1: required i64 sessionId
-
- // The statement to be executed (DML, DDL, SET, etc)
- 2: required string statement
-
- // statementId
- 3: required i64 statementId
-
- 4: optional i32 fetchSize
-}
-
-struct TSExecuteBatchStatementReq{
- // The session to execute the statement against
- 1: required i64 sessionId
-
- // The statements to be executed (DML, DDL, SET, etc)
- 2: required list<string> statements
-}
-
-struct TSGetOperationStatusReq {
- 1: required i64 sessionId
- // Session to run this request against
- 2: required i64 queryId
-}
-
-// CancelOperation()
-//
-// Cancels processing on the specified operation handle and frees any resources which were allocated.
-struct TSCancelOperationReq {
- 1: required i64 sessionId
- // Operation to cancel
- 2: required i64 queryId
-}
-
-// CloseOperation()
-struct TSCloseOperationReq {
- 1: required i64 sessionId
- 2: optional i64 queryId
- 3: optional i64 statementId
-}
-
-struct TSFetchResultsReq{
- 1: required i64 sessionId
- 2: required string statement
- 3: required i32 fetchSize
- 4: required i64 queryId
- 5: required bool isAlign
-}
-
-struct TSFetchResultsResp{
- 1: required TSStatus status
- 2: required bool hasResultSet
- 3: required bool isAlign
- 4: optional TSQueryDataSet queryDataSet
- 5: optional TSQueryNonAlignDataSet nonAlignQueryDataSet
-}
-
-struct TSFetchMetadataResp{
- 1: required TSStatus status
- 2: optional string metadataInJson
- 3: optional list<string> columnsList
- 4: optional string dataType
-}
-
-struct TSFetchMetadataReq{
- 1: required i64 sessionId
- 2: required string type
- 3: optional string columnPath
-}
-
-struct TSGetTimeZoneResp {
- 1: required TSStatus status
- 2: required string timeZone
-}
-
-struct TSSetTimeZoneReq {
- 1: required i64 sessionId
- 2: required string timeZone
-}
-
-// for session
-struct TSInsertRecordReq {
- 1: required i64 sessionId
- 2: required string deviceId
- 3: required list<string> measurements
- 4: required binary values
- 5: required i64 timestamp
- 6: optional bool inferType
-}
-
-struct TSInsertTabletReq {
- 1: required i64 sessionId
- 2: required string deviceId
- 3: required list<string> measurements
- 4: required binary values
- 5: required binary timestamps
- 6: required list<i32> types
- 7: required i32 size
-}
-
-struct TSInsertTabletsReq {
- 1: required i64 sessionId
- 2: required list<string> deviceIds
- 3: required list<list<string>> measurementsList
- 4: required list<binary> valuesList
- 5: required list<binary> timestampsList
- 6: required list<list<i32>> typesList
- 7: required list<i32> sizeList
-}
-
-struct TSInsertRecordsReq {
- 1: required i64 sessionId
- 2: required list<string> deviceIds
- 3: required list<list<string>> measurementsList
- 4: required list<binary> valuesList
- 5: required list<i64> timestamps
- 6: optional bool inferType
-}
-
-struct TSDeleteDataReq {
- 1: required i64 sessionId
- 2: required list<string> paths
- 3: required i64 timestamp
-}
-
-struct TSCreateTimeseriesReq {
- 1: required i64 sessionId
- 2: required string path
- 3: required i32 dataType
- 4: required i32 encoding
- 5: required i32 compressor
- 6: optional map<string, string> props
- 7: optional map<string, string> tags
- 8: optional map<string, string> attributes
- 9: optional string measurementAlias
-}
-
-struct TSCreateMultiTimeseriesReq {
- 1: required i64 sessionId
- 2: required list<string> paths
- 3: required list<i32> dataTypes
- 4: required list<i32> encodings
- 5: required list<i32> compressors
- 6: optional list<map<string, string>> propsList
- 7: optional list<map<string, string>> tagsList
- 8: optional list<map<string, string>> attributesList
- 9: optional list<string> measurementAliasList
-}
-
-struct ServerProperties {
- 1: required string version;
- 2: required list<string> supportedTimeAggregationOperations;
- 3: required string timestampPrecision;
-}
-
-struct TSQueryDataSet{
- // ByteBuffer for time column
- 1: required binary time
- // ByteBuffer for each column values
- 2: required list<binary> valueList
- // Bitmap for each column to indicate whether it is a null value
- 3: required list<binary> bitmapList
-}
-
-struct TSQueryNonAlignDataSet{
- // ByteBuffer for each time column
- 1: required list<binary> timeList
- // ByteBuffer for each column values
- 2: required list<binary> valueList
-}
-
-service TSIService {
- TSOpenSessionResp openSession(1:TSOpenSessionReq req);
-
- TSStatus closeSession(1:TSCloseSessionReq req);
-
- TSExecuteStatementResp executeStatement(1:TSExecuteStatementReq req);
-
- TSStatus executeBatchStatement(1:TSExecuteBatchStatementReq req);
-
- TSExecuteStatementResp executeQueryStatement(1:TSExecuteStatementReq req);
-
- TSExecuteStatementResp executeUpdateStatement(1:TSExecuteStatementReq req);
-
- TSFetchResultsResp fetchResults(1:TSFetchResultsReq req)
-
- TSFetchMetadataResp fetchMetadata(1:TSFetchMetadataReq req)
-
- TSStatus cancelOperation(1:TSCancelOperationReq req);
-
- TSStatus closeOperation(1:TSCloseOperationReq req);
-
- TSGetTimeZoneResp getTimeZone(1:i64 sessionId);
-
- TSStatus setTimeZone(1:TSSetTimeZoneReq req);
-
- ServerProperties getProperties();
-
- TSStatus setStorageGroup(1:i64 sessionId, 2:string storageGroup);
-
- TSStatus createTimeseries(1:TSCreateTimeseriesReq req);
-
- TSStatus createMultiTimeseries(1:TSCreateMultiTimeseriesReq req);
-
- TSStatus deleteTimeseries(1:i64 sessionId, 2:list<string> path)
-
- TSStatus deleteStorageGroups(1:i64 sessionId, 2:list<string> storageGroup);
-
- TSStatus insertRecord(1:TSInsertRecordReq req);
-
- TSStatus insertTablet(1:TSInsertTabletReq req);
-
- TSStatus insertTablets(1:TSInsertTabletsReq req);
-
- TSStatus insertRecords(1:TSInsertRecordsReq req);
-
- TSStatus testInsertTablet(1:TSInsertTabletReq req);
-
- TSStatus testInsertTablets(1:TSInsertTabletsReq req);
-
- TSStatus testInsertRecord(1:TSInsertRecordReq req);
-
- TSStatus testInsertRecords(1:TSInsertRecordsReq req);
-
- TSStatus deleteData(1:TSDeleteDataReq req);
-
- i64 requestStatementId(1:i64 sessionId);
-}
diff --git a/service-rpc/src/main/thrift/sync.thrift b/service-rpc/src/main/thrift/sync.thrift
deleted file mode 100755
index 3e243f4..0000000
--- a/service-rpc/src/main/thrift/sync.thrift
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-namespace java org.apache.iotdb.service.sync.thrift
-
-struct SyncStatus{
- 1:required i32 code
- 2:required string msg
-}
-
-// The sender and receiver need to check some info to confirm validity
-struct ConfirmInfo{
- // check whether the ip of sender is in thw white list of receiver.
- 1:string address
-
- // Sender needs to tell receiver its identity.
- 2:string uuid
-
- // The partition interval of sender and receiver need to be the same.
- 3:i64 partitionInterval
-
- // The version of sender and receiver need to be the same.
- 4:string version
-}
-
-service SyncService{
- SyncStatus check(ConfirmInfo info)
- SyncStatus startSync();
- SyncStatus init(1:string storageGroupName)
- SyncStatus syncDeletedFileName(1:string fileName)
- SyncStatus initSyncData(1:string filename)
- SyncStatus syncData(1:binary buff)
- SyncStatus checkDataMD5(1:string md5)
- SyncStatus endSync()
-}
\ No newline at end of file