Skip to content

Conversation

@Wei-hao-Li
Copy link
Collaborator

No description provided.

Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
Copy link
Contributor

@JackieTien97 JackieTien97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

partial review, finish CN and antlr parts.

crc32.reset();
crc32.update(bytes, 0, length);

long expectedCRC = ReadWriteIOUtils.readLong(inputStream);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
long expectedCRC = ReadWriteIOUtils.readLong(inputStream);
int expectedCRC = ReadWriteIOUtils.readInt(inputStream);


ReadWriteIOUtils.write(bytes.length, outputStream);
outputStream.write(bytes);
ReadWriteIOUtils.write(crc32.getValue(), outputStream);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ReadWriteIOUtils.write(crc32.getValue(), outputStream);
ReadWriteIOUtils.write((int) crc32.getValue(), outputStream);

crc32.update(bytes, 0, length);

long expectedCRC = ReadWriteIOUtils.readLong(inputStream);
if (crc32.getValue() != expectedCRC) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (crc32.getValue() != expectedCRC) {
if (((int) crc32.getValue()) != expectedCRC) {

Copy link
Contributor

@JackieTien97 JackieTien97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add all ITs you list in the documents and the recovery process is missing

Comment on lines +558 to +562
new ColumnHeader(SERVICE_NAME, TSDataType.TEXT),
new ColumnHeader(DATA_NODE_ID, TSDataType.INT32),
new ColumnHeader(STATE, TSDataType.TEXT),
new ColumnHeader(CLASS_NAME, TSDataType.TEXT),
new ColumnHeader(SERVICE_TYPE, TSDataType.TEXT));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
new ColumnHeader(SERVICE_NAME, TSDataType.TEXT),
new ColumnHeader(DATA_NODE_ID, TSDataType.INT32),
new ColumnHeader(STATE, TSDataType.TEXT),
new ColumnHeader(CLASS_NAME, TSDataType.TEXT),
new ColumnHeader(SERVICE_TYPE, TSDataType.TEXT));
new ColumnHeader(SERVICE_NAME, TSDataType.STRING),
new ColumnHeader(DATA_NODE_ID, TSDataType.INT32),
new ColumnHeader(STATE, TSDataType.STRING),
new ColumnHeader(CLASS_NAME, TSDataType.STRING),
new ColumnHeader(SERVICE_TYPE, TSDataType.STRING));

RPC_SERVICE("RPC ServerService", "RPCService"),
INFLUX_SERVICE("InfluxDB Protocol Service", "InfluxDB Protocol"),
MQTT_SERVICE("MQTTService", "MqttService"),
EXTERNAL_SERVICE("ExternalService Service", "ExternalService"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this enum is never used.

if (IoTDBRestServiceDescriptor.getInstance().getConfig().isEnableRestService()) {
registerManager.register(RestService.getInstance());
}
// registerManager.register(ExternalServiceManagementService.getInstance());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need this? or should be just deleted.

Optional.of(
new ComparisonExpression(
ComparisonExpression.Operator.EQUAL,
new Identifier("datanode_id"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
new Identifier("datanode_id"),
new Identifier(ColumnHeaderConstant.DATA_NODE_ID_TABLE_MODEL),

@Override
protected IConfigTask visitCreateExternalService(
CreateExternalService node, MPPQueryContext context) {
context.setQueryType(QueryType.WRITE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
context.setQueryType(QueryType.WRITE);
context.setQueryType(QueryType.WRITE);
accessControl.checkUserGlobalSysPrivilege(context);

ExternalServiceManagementService.getInstance().stopService(serviceName);
future.set(new ConfigTaskResult(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode())));
} catch (Exception e) {
future.setException(new ExternalServiceManagementException(e.getMessage()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

ExternalServiceManagementService.getInstance().dropService(serviceName, forcedly);
future.set(new ConfigTaskResult(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode())));
} catch (Exception e) {
future.setException(new ExternalServiceManagementException(e.getMessage()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

new ConfigTaskResult(
TSStatusCode.SUCCESS_STATUS, builder.build(), getShowExternalServiceHeader()));
} catch (Exception e) {
future.setException(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Comment on lines +28 to +35
MQTT(
"MQTT",
"org.apache.iotdb.externalservice.Mqtt",
IoTDBDescriptor.getInstance().getConfig()::isEnableMQTTService),
REST(
"REST",
"org.apache.iotdb.externalservice.Rest",
IoTDBRestServiceDescriptor.getInstance().getConfig()::isEnableRestService);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MQTT(
"MQTT",
"org.apache.iotdb.externalservice.Mqtt",
IoTDBDescriptor.getInstance().getConfig()::isEnableMQTTService),
REST(
"REST",
"org.apache.iotdb.externalservice.Rest",
IoTDBRestServiceDescriptor.getInstance().getConfig()::isEnableRestService);
MQTT(
"MQTT",
"org.apache.iotdb.externalservice.Mqtt",
// IoTDBDescriptor.getInstance().getConfig()::isEnableMQTTService),
() -> false),
REST(
"REST",
"org.apache.iotdb.externalservice.Rest",
// IoTDBRestServiceDescriptor.getInstance().getConfig()::isEnableRestService);
() -> false);

better always return false before you really seperate the rest and mqtt service outside. Otherwise, mqtt and rest ITs will fail because org.apache.iotdb.externalservice.Mqtt and org.apache.iotdb.externalservice.Rest is not found

Comment on lines +28 to +35
MQTT(
"MQTT",
"org.apache.iotdb.externalservice.Mqtt",
IoTDBDescriptor.getInstance().getConfig()::isEnableMQTTService),
REST(
"REST",
"org.apache.iotdb.externalservice.Rest",
IoTDBRestServiceDescriptor.getInstance().getConfig()::isEnableRestService);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MQTT(
"MQTT",
"org.apache.iotdb.externalservice.Mqtt",
IoTDBDescriptor.getInstance().getConfig()::isEnableMQTTService),
REST(
"REST",
"org.apache.iotdb.externalservice.Rest",
IoTDBRestServiceDescriptor.getInstance().getConfig()::isEnableRestService);
MQTT(
"MQTT",
"org.apache.iotdb.externalservice.Mqtt",
// IoTDBDescriptor.getInstance().getConfig()::isEnableMQTTService),
() -> false),
REST(
"REST",
"org.apache.iotdb.externalservice.Rest",
// IoTDBRestServiceDescriptor.getInstance().getConfig()::isEnableRestService);
() -> false);

better always return false before you really seperate the rest and mqtt service outside. Otherwise, mqtt and rest ITs will fail because org.apache.iotdb.externalservice.Mqtt and org.apache.iotdb.externalservice.Rest is not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants