You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/06/21 11:19:52 UTC
[incubator-iotdb] branch add_close_for_SessionDataSetWrapper
created (now c75c600)
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a change to branch add_close_for_SessionDataSetWrapper
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.
at c75c600 make SessionDataSetWrapper
This branch includes the following new commits:
new c75c600 make SessionDataSetWrapper
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-iotdb] 01/01: make SessionDataSetWrapper
Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch add_close_for_SessionDataSetWrapper
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit c75c60009c29b7b2f755766eeecf813e6caf1a0b
Author: qiaojialin <64...@qq.com>
AuthorDate: Sun Jun 21 19:20:08 2020 +0800
make SessionDataSetWrapper
---
.../org/apache/iotdb/session/pool/SessionDataSetWrapper.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/session/src/main/java/org/apache/iotdb/session/pool/SessionDataSetWrapper.java b/session/src/main/java/org/apache/iotdb/session/pool/SessionDataSetWrapper.java
index 53df42d..a6e639d 100644
--- a/session/src/main/java/org/apache/iotdb/session/pool/SessionDataSetWrapper.java
+++ b/session/src/main/java/org/apache/iotdb/session/pool/SessionDataSetWrapper.java
@@ -27,7 +27,7 @@ import org.apache.iotdb.session.SessionDataSet.DataIterator;
import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
import org.apache.iotdb.tsfile.read.common.RowRecord;
-public class SessionDataSetWrapper {
+public class SessionDataSetWrapper implements AutoCloseable{
SessionDataSet sessionDataSet;
Session session;
@@ -91,4 +91,11 @@ public class SessionDataSetWrapper {
public List<TSDataType> getColumnTypes() {
return sessionDataSet.getColumnTypes();
}
+
+ /**
+ * close this dataset to release the session
+ */
+ public void close() {
+ pool.closeResultSet(this);
+ }
}