Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ mvn clean package -DskipTests
Mark `iotdb-core/antlr/target/generated-sources/antlr4` and `iotdb-protocol/thrift-datanode/target/generated-sources/thrift` as `Source Root`.

* Server main function:`iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode`, can be started in debug mode.
* Cli:`iotdb-client/cli/src/main/java/org/apache/iotdb/cli/`,Use Cli for linux and WinCli for windows, you can start directly with the parameter "`-h 127.0.0.1 -p 6667 -u root -pw IoTDB@2011`"
* Cli:`iotdb-client/cli/src/main/java/org/apache/iotdb/cli/`,Use Cli for linux and WinCli for windows, you can start directly with the parameter "`-h 127.0.0.1 -p 6667 -u root -pw root`"
* Server rpc implementation (mainly used for cli and server communication, generally start interruption point here):`iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/TSServiceImpl`
* all jdbc statements:`executeStatement(TSExecuteStatementReq req)`
* jdbc query:`executeQueryStatement(TSExecuteStatementReq req)`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ Users can start 1C1D IoTDB by the start-standalone script under the sbin folder.

IoTDB offers different ways to interact with server, here we introduce the basic steps of using Cli tool to insert and query data.

After installing IoTDB, there is a default user 'root', its default password is 'IoTDB@2011'. Users can use this
After installing IoTDB, there is a default user 'root', its default password is 'root'. Users can use this
default user to login Cli to use IoTDB. The start-up script of Cli is the start-cli script in the folder sbin. When executing the script, user should assign
IP, PORT, USER_NAME and PASSWORD. The default parameters are "-h 127.0.0.1 -p 6667 -u root -pw IoTDB@2011".
IP, PORT, USER_NAME and PASSWORD. The default parameters are "-h 127.0.0.1 -p 6667 -u root -pw root".

Here is the command for starting the Cli:

Expand Down
4 changes: 2 additions & 2 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ git checkout rel/x.x

IoTDB提供了与服务器交互的不同方式,这里我们将介绍使用 Cli 工具插入和查询数据的基本步骤。

安装 IoTDB 后,有一个默认的用户`root`,它的默认密码是`IoTDB@2011`。用户可以使用这个
安装 IoTDB 后,有一个默认的用户`root`,它的默认密码是`root`。用户可以使用这个
默认用户登录 Cli 并使用 IoTDB。Cli 的启动脚本是 sbin 文件夹中的 start-cli 脚本。
在执行脚本时,用户应该指定 IP,端口,USER_NAME 和 密码。默认参数为`-h 127.0.0.1 -p 6667 -u root -pw IoTDB@2011`。
在执行脚本时,用户应该指定 IP,端口,USER_NAME 和 密码。默认参数为`-h 127.0.0.1 -p 6667 -u root -pw root`。


下面是启动 Cli 的命令:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void deleteStorageGroups() {
int main() {
LOG_LEVEL = LEVEL_DEBUG;

session = new Session("127.0.0.1", 6667, "root", "IoTDB@2011");
session = new Session("127.0.0.1", 6667, "root", "root");

cout << "session open\n" << endl;
session->open(false);
Expand Down
2 changes: 1 addition & 1 deletion example/client-cpp-example/src/SessionExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void queryLast() {
int main() {
LOG_LEVEL = LEVEL_DEBUG;

session = new Session("127.0.0.1", 6667, "root", "IoTDB@2011");
session = new Session("127.0.0.1", 6667, "root", "root");
session->open(false);

cout << "setStorageGroup: root.sg1\n" << endl;
Expand Down
4 changes: 2 additions & 2 deletions example/client-cpp-example/src/TableModelSessionExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int main() {
->host("127.0.0.1")
->rpcPort(6667)
->username("root")
->password("IoTDB@2011")
->password("root")
->build();


Expand Down Expand Up @@ -165,7 +165,7 @@ int main() {
->host("127.0.0.1")
->rpcPort(6667)
->username("root")
->password("IoTDB@2011")
->password("root")
->database("db1")
->build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void main(String[] args) throws Exception {

try (final Connection connection =
DriverManager.getConnection(
"jdbc:iotdb://127.0.0.1:6667?charset=GB18030", "root", "IoTDB@2011");
"jdbc:iotdb://127.0.0.1:6667?charset=GB18030", "root", "root");
final IoTDBStatement statement = (IoTDBStatement) connection.createStatement()) {

final String insertSQLWithGB18030 =
Expand All @@ -63,7 +63,7 @@ private static void outputResult(String charset) throws SQLException {
System.out.println("[Charset: " + charset + "]");
try (final Connection connection =
DriverManager.getConnection(
"jdbc:iotdb://127.0.0.1:6667?charset=" + charset, "root", "IoTDB@2011");
"jdbc:iotdb://127.0.0.1:6667?charset=" + charset, "root", "root");
final IoTDBStatement statement = (IoTDBStatement) connection.createStatement()) {
outputResult(statement.executeQuery("select ** from root"), Charset.forName(charset));
} catch (IoTDBSQLException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static void main(String[] args) throws ClassNotFoundException, SQLExcepti
Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
try (Connection connection =
DriverManager.getConnection(
"jdbc:iotdb://127.0.0.1:6667?version=V_1_0", "root", "IoTDB@2011");
"jdbc:iotdb://127.0.0.1:6667?version=V_1_0", "root", "root");
Statement statement = connection.createStatement()) {

// set JDBC fetchSize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class PrepareStatementDemo {
public static void main(String[] args) throws ClassNotFoundException, SQLException {
Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
try (Connection connection =
DriverManager.getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "IoTDB@2011");
DriverManager.getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "root");
PreparedStatement preparedStatement =
connection.prepareStatement(
"insert into root.ln.wf01.wt01(timestamp,status,temperature) values(?,?,?)")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void main(String[] args) throws ClassNotFoundException, SQLExcepti
Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
try (Connection connection =
DriverManager.getConnection(
"jdbc:iotdb://127.0.0.1:6667?version=V_1_0", "root", "IoTDB@2011");
"jdbc:iotdb://127.0.0.1:6667?version=V_1_0", "root", "root");
Statement statement = connection.createStatement()) {

// set JDBC fetchSize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void main(String[] args) throws ClassNotFoundException, SQLExcepti
// don't specify database in url
try (Connection connection =
DriverManager.getConnection(
"jdbc:iotdb://127.0.0.1:6667?sql_dialect=table", "root", "IoTDB@2011");
"jdbc:iotdb://127.0.0.1:6667?sql_dialect=table", "root", "root");
Statement statement = connection.createStatement()) {

statement.execute("CREATE DATABASE test1");
Expand Down Expand Up @@ -82,7 +82,7 @@ public static void main(String[] args) throws ClassNotFoundException, SQLExcepti
// specify database in url
try (Connection connection =
DriverManager.getConnection(
"jdbc:iotdb://127.0.0.1:6667/test1?sql_dialect=table", "root", "IoTDB@2011");
"jdbc:iotdb://127.0.0.1:6667/test1?sql_dialect=table", "root", "root");
Statement statement = connection.createStatement()) {
// show tables from current database test1
try (ResultSet resultSet = statement.executeQuery("SHOW TABLES")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static void main(String[] args) throws Exception {
MQTT mqtt = new MQTT();
mqtt.setHost("127.0.0.1", 1883);
mqtt.setUserName("root");
mqtt.setPassword("IoTDB@2011");
mqtt.setPassword("root");
mqtt.setConnectAttemptsMax(3);
mqtt.setReconnectDelay(10);

Expand Down
2 changes: 1 addition & 1 deletion example/odbc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Then, you can see the output `iotdb-jdbc-1.3.2-SNAPSHOT-jar-with-dependencies.ja
| Driver Class | org.apache.iotdb.jdbc.IoTDBDriver | org.apache.iotdb.jdbc.IoTDBDriver |
| JDBC driver file(s) | The path of IoTDB JDBC jar-with-dependencies | C:\Users\13361\Documents\GitHub\iotdb\iotdb-client\jdbc\target\iotdb-jdbc-1.3.2-SNAPSHOT-jar-with-dependencies.jar |
| User name | IoTDB's user name | root |
| User password | IoTDB's password | IoTDB@2011 |
| User password | IoTDB's password | root |

![ODBC_CONNECTION.png](https://alioss.timecho.com/upload/ODBC_CONNECTION.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class IoTDBKeyStoreLoaderClient {
Pattern.compile("^(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])$");

private static final String CLIENT_ALIAS = "client-ai";
private static final char[] PASSWORD = "IoTDB@2011".toCharArray();
private static final char[] PASSWORD = "root".toCharArray();

private X509Certificate[] clientCertificateChain;
private X509Certificate clientCertificate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private HttpPost getHttpPost(String url) {
HttpPost httpPost = new HttpPost(url);
httpPost.addHeader("Content-type", "application/json; charset=utf-8");
httpPost.setHeader("Accept", "application/json");
String authorization = getAuthorization("root", "IoTDB@2011");
String authorization = getAuthorization("root", "root");
httpPost.setHeader("Authorization", authorization);
return httpPost;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private HttpPost getHttpPost(String url) {
HttpPost httpPost = new HttpPost(url);
httpPost.addHeader("Content-type", "application/json; charset=utf-8");
httpPost.setHeader("Accept", "application/json");
String authorization = getAuthorization("root", "IoTDB@2011");
String authorization = getAuthorization("root", "root");
httpPost.setHeader("Authorization", authorization);
return httpPost;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private HttpPost getHttpPost(String url) {
HttpPost httpPost = new HttpPost(url);
httpPost.addHeader("Content-type", "application/json; charset=utf-8");
httpPost.setHeader("Accept", "application/json");
String authorization = getAuthorization("root", "IoTDB@2011");
String authorization = getAuthorization("root", "root");
httpPost.setHeader("Authorization", authorization);
return httpPost;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private HttpPost getHttpPost(String url) {
HttpPost httpPost = new HttpPost(url);
httpPost.addHeader("Content-type", "application/json; charset=utf-8");
httpPost.setHeader("Accept", "application/json");
String authorization = getAuthorization("root", "IoTDB@2011");
String authorization = getAuthorization("root", "root");
httpPost.setHeader("Authorization", authorization);
return httpPost;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
*
* <p>The usage of export-csv.sh can be found in the <a
* href="https://iotdb.apache.org/zh/UserGuide/V1.2.x/Tools-System/Import-Export-Tool.html#csv%E5%AF%BC%E5%85%A5%E5%AF%BC%E5%87%BA%E5%B7%A5%E5%85%B7">documentation</a>.
* For example: ./export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw IoTDB@2011 -td . -q "show
* timeseries"
* For example: ./export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td . -q "show timeseries"
*/
public class PathCheckExample {
private static final List<String> INPUT_LIST = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class AlignedTimeseriesSessionExample {

public static void main(String[] args)
throws IoTDBConnectionException, StatementExecutionException {
session = new Session("127.0.0.1", 6667, "root", "IoTDB@2011");
session = new Session("127.0.0.1", 6667, "root", "root");
session.open(false);

// set session fetchSize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public static void main(String[] args)
path = args[0];
}

readerPool = new SessionPool("127.0.0.1", 6667, "root", "IoTDB@2011", CONCURRENCY);
writerPool = new SessionPool("127.0.0.1", 6668, "root", "IoTDB@2011", CONCURRENCY);
readerPool = new SessionPool("127.0.0.1", 6667, "root", "root", CONCURRENCY);
writerPool = new SessionPool("127.0.0.1", 6668, "root", "root", CONCURRENCY);

SessionDataSetWrapper deviceDataSet = readerPool.executeQueryStatement("count devices " + path);
DataIterator deviceIter = deviceDataSet.iterator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class HybridTimeseriesSessionExample {

public static void main(String[] args)
throws IoTDBConnectionException, StatementExecutionException {
session = new Session("127.0.0.1", 6667, "root", "IoTDB@2011");
session = new Session("127.0.0.1", 6667, "root", "root");
session.open(false);

// set session fetchSize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class SessionConcurrentExample {
public static void main(String[] args)
throws IoTDBConnectionException, StatementExecutionException, IOException {

try (Session session = new Session("127.0.0.1", 6667, "root", "IoTDB@2011")) {
try (Session session = new Session("127.0.0.1", 6667, "root", "root")) {
session.open(false);
createTemplate(session);
} catch (Exception e) {
Expand All @@ -80,7 +80,7 @@ public static void main(String[] args)

private static void concurrentOperation(CountDownLatch latch, int currentIndex) {

Session session = new Session("127.0.0.1", 6667, "root", "IoTDB@2011");
Session session = new Session("127.0.0.1", 6667, "root", "root");
try {
session.open(false);
} catch (IoTDBConnectionException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void main(String[] args)
.host(LOCAL_HOST)
.port(6667)
.username("root")
.password("IoTDB@2011")
.password("root")
.version(Version.V_1_0)
.build();
session.open(false);
Expand Down Expand Up @@ -112,7 +112,7 @@ public static void main(String[] args)
// deleteTimeseries();
// setTimeout();

sessionEnableRedirect = new Session(LOCAL_HOST, 6667, "root", "IoTDB@2011");
sessionEnableRedirect = new Session(LOCAL_HOST, 6667, "root", "root");
sessionEnableRedirect.setEnableQueryRedirection(true);
sessionEnableRedirect.open(false);

Expand Down Expand Up @@ -820,7 +820,7 @@ private static void nonQuery() throws IoTDBConnectionException, StatementExecuti
}

private static void setTimeout() throws IoTDBConnectionException {
try (Session tempSession = new Session(LOCAL_HOST, 6667, "root", "IoTDB@2011", 10000, 20000)) {
try (Session tempSession = new Session(LOCAL_HOST, 6667, "root", "root", 10000, 20000)) {
tempSession.setQueryTimeout(60000);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private static void constructCustomSessionPool() {
.host("127.0.0.1")
.port(6667)
.user("root")
.password("IoTDB@2011")
.password("root")
.maxSize(3)
.build();
}
Expand All @@ -62,7 +62,7 @@ private static void constructRedirectSessionPool() {
new SessionPool.Builder()
.nodeUrls(nodeUrls)
.user("root")
.password("IoTDB@2011")
.password("root")
.maxSize(3)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private static void prepareData() throws Exception {
.host(HOST)
.port(PORT)
.username("root")
.password("IoTDB@2011")
.password("root")
.version(Version.V_1_0)
.build();
session.open(false);
Expand Down Expand Up @@ -103,7 +103,7 @@ private static void dataQuery() throws Exception {
.host(HOST)
.port(PORT)
.username("root")
.password("IoTDB@2011")
.password("root")
.version(Version.V_1_0)
.build();
session.open(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static void main(String[] args)
.host(LOCAL_HOST)
.port(6667)
.username("root")
.password("IoTDB@2011")
.password("root")
.version(Version.V_1_0)
.build();
session.open(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static void main(String[] args) {
new TableSessionBuilder()
.nodeUrls(Collections.singletonList(LOCAL_URL))
.username("root")
.password("IoTDB@2011")
.password("root")
.build()) {

session.executeNonQueryStatement("CREATE DATABASE test1");
Expand Down Expand Up @@ -140,7 +140,7 @@ public static void main(String[] args) {
new TableSessionBuilder()
.nodeUrls(Collections.singletonList(LOCAL_URL))
.username("root")
.password("IoTDB@2011")
.password("root")
.database("test1")
.build()) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void main(String[] args) {
new TableSessionPoolBuilder()
.nodeUrls(Collections.singletonList(LOCAL_URL))
.user("root")
.password("IoTDB@2011")
.password("root")
.maxSize(1)
.build();

Expand Down Expand Up @@ -159,7 +159,7 @@ public static void main(String[] args) {
new TableSessionPoolBuilder()
.nodeUrls(Collections.singletonList(LOCAL_URL))
.user("root")
.password("IoTDB@2011")
.password("root")
.maxSize(1)
.database("test1")
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private static void dataSubscription() throws Exception {
.host("127.0.0.1")
.port(6667)
.username("root")
.password("IoTDB@2011")
.password("root")
.build()) {
final Properties config = new Properties();
config.put(TopicConstant.DATABASE_KEY, "db.*");
Expand Down Expand Up @@ -151,7 +151,7 @@ private static void dataSubscription() throws Exception {
.host("127.0.0.1")
.port(6667)
.username("root")
.password("IoTDB@2011")
.password("root")
.build()) {
session.getTopics().forEach((System.out::println));
session.getSubscriptions().forEach((System.out::println));
Expand All @@ -166,7 +166,7 @@ public static void main(final String[] args) throws Exception {
new TableSessionBuilder()
.nodeUrls(Collections.singletonList(HOST + ":" + PORT))
.username("root")
.password("IoTDB@2011")
.password("root")
.build()) {
createDataBaseAndTable(session, "db1", "test1");
createDataBaseAndTable(session, "db1", "test2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private static Map<String, ArrayList<Object>> loadCSVData(
*/
public static void main(String[] args) throws Exception {

try (Session session = new Session("127.0.0.1", 6667, "root", "IoTDB@2011")) {
try (Session session = new Session("127.0.0.1", 6667, "root", "root")) {
session.open();
String dataFileName = "sample.csv";
int rowSize = 10000;
Expand Down
Loading
Loading