Skip to content

Commit 4027aec

Browse files
committed
init
1 parent b6c13d7 commit 4027aec

File tree

5 files changed

+83
-1
lines changed

5 files changed

+83
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package org.apache.iotdb.pipe.api.collector;
21+
22+
import org.apache.iotdb.pipe.api.event.dml.insertion.TabletInsertionEvent;
23+
24+
import java.util.List;
25+
26+
public interface DataCollector {
27+
List<TabletInsertionEvent> convertToTabletInsertionEvents(final boolean shouldReport);
28+
}

iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/collector/RowCollector.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@
2222
import org.apache.iotdb.pipe.api.access.Row;
2323
import org.apache.iotdb.pipe.api.event.dml.insertion.TabletInsertionEvent;
2424

25+
import javax.xml.crypto.Data;
2526
import java.io.IOException;
2627
import java.util.function.BiConsumer;
2728

2829
/**
2930
* Used to collect rows generated by {@link TabletInsertionEvent#processRowByRow(BiConsumer)},
3031
* {@link TabletInsertionEvent#processTablet(BiConsumer)}.
3132
*/
32-
public interface RowCollector {
33+
public interface RowCollector extends DataCollector {
3334

3435
/**
3536
* Collects a row.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package org.apache.iotdb.pipe.api.collector;
21+
22+
import org.apache.iotdb.pipe.api.access.Row;
23+
import org.apache.tsfile.write.record.Tablet;
24+
25+
import java.io.IOException;
26+
27+
public interface TabletCollector extends DataCollector {
28+
void collectTablet(Tablet tablet) throws IOException;
29+
}

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/row/PipeRowCollector.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ private void collectTabletInsertionEvent() {
142142
this.tablet = null;
143143
}
144144

145+
@Override
145146
public List<TabletInsertionEvent> convertToTabletInsertionEvents(final boolean shouldReport) {
146147
collectTabletInsertionEvent();
147148

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package org.apache.iotdb.db.pipe.event.common.tablet;
21+
22+
public class PipeTabletCollector {
23+
}

0 commit comments

Comments
 (0)