HeimingZ commented on a change in pull request #5320:
URL: https://github.com/apache/iotdb/pull/5320#discussion_r839345096
##########
File path: server/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java
##########
@@ -270,4 +307,62 @@ public static TSQueryDataSet
convertQueryDataSetByFetchSize(
}
return values;
}
+
+ public static Object[] readValuesFromBuffer(
Review comment:
Fixed.
##########
File path: server/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java
##########
@@ -207,6 +235,15 @@ public static TSQueryDataSet
convertQueryDataSetByFetchSize(
return readValuesFromBuffer(buffer, dataTypes, columns, size);
}
+ public static Object[] readValuesFromBuffer(
Review comment:
Fixed.
##########
File path: server/src/main/java/org/apache/iotdb/db/wal/buffer/IWALBuffer.java
##########
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+package org.apache.iotdb.db.wal.buffer;
+
+import org.apache.iotdb.commons.utils.TestOnly;
+
+/** Currently, there are 2 buffer types */
Review comment:
Fixed.
##########
File path:
server/src/main/java/org/apache/iotdb/db/wal/utils/listener/WALRecoverListener.java
##########
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+package org.apache.iotdb.db.wal.utils.listener;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/** This class helps judge whether some TsFile is recovered. */
+public class WALRecoverListener implements IResultListener {
+ private static final Logger logger =
LoggerFactory.getLogger(WALRecoverListener.class);
+
+ /** path of recovering TsFile */
+ private final String filePath;
+
+ private volatile Status status;
+ private volatile Exception cause;
+
+ public WALRecoverListener(String filePath) {
+ this.filePath = filePath;
+ status = Status.RUNNING;
+ cause = null;
+ }
+
+ public synchronized WALRecoverListener succeed() {
+ status = Status.SUCCESS;
+ this.notifyAll();
+ return this;
+ }
+
+ public synchronized WALRecoverListener fail(Exception e) {
+ status = Status.FAILURE;
+ cause = e;
+ this.notifyAll();
+ return this;
+ }
+
+ public synchronized WALRecoverListener.Status getResult() {
Review comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]