Skip to content

Commit fb39c00

Browse files
committed
refactor: remove unused arguments
1 parent cf35be6 commit fb39c00

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

traindb-core/src/main/java/traindb/engine/Session.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.apache.commons.lang3.exception.ExceptionUtils;
3434
import org.json.simple.JSONObject;
3535
import org.json.simple.parser.JSONParser;
36-
import traindb.catalog.CatalogContext;
3736
import traindb.common.TrainDBException;
3837
import traindb.common.TrainDBLogger;
3938
import traindb.engine.nio.ByteBuffers;
@@ -56,24 +55,16 @@ public final class Session implements Runnable {
5655

5756
private final SocketChannel clientChannel;
5857
private final EventHandler eventHandler;
59-
60-
private final CatalogContext catalogContext;
6158
private final SchemaManager schemaManager;
62-
6359
final MessageStream messageStream;
6460

65-
Session(SocketChannel clientChannel, EventHandler eventHandler,
66-
CatalogContext catalogContext, SchemaManager schemaManager) {
61+
Session(SocketChannel clientChannel, EventHandler eventHandler, SchemaManager schemaManager) {
6762
sessionId = new Random(this.hashCode()).nextInt();
6863
cancelContext = new CancelContext(this);
6964
this.clientChannel = clientChannel;
7065
this.eventHandler = eventHandler;
71-
this.messageStream = new MessageStream(clientChannel);
72-
73-
this.catalogContext = catalogContext;
7466
this.schemaManager = schemaManager;
75-
76-
// TODO: create TrainDBQueryEngine
67+
this.messageStream = new MessageStream(clientChannel);
7768
}
7869

7970
public static Session currentSession() {

traindb-core/src/main/java/traindb/engine/SessionFactory.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,13 @@
2020
import traindb.schema.SchemaManager;
2121

2222
public class SessionFactory {
23-
private final CatalogStore catalogStore;
2423
private final SchemaManager schemaManager;
2524

26-
public SessionFactory(CatalogStore catalogStore, SchemaManager schemaManager) {
27-
this.catalogStore = catalogStore;
25+
public SessionFactory(SchemaManager schemaManager) {
2826
this.schemaManager = schemaManager;
2927
}
3028

3129
public Session createSession(SocketChannel clientChannel, Session.EventHandler sessEvtHandler) {
32-
return new Session(
33-
clientChannel, sessEvtHandler, catalogStore.getCatalogContext(), schemaManager);
30+
return new Session(clientChannel, sessEvtHandler, schemaManager);
3431
}
3532
}

traindb-core/src/main/java/traindb/engine/TrainDBServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected void serviceInit(Configuration conf) throws Exception {
4747
SchemaManager schemaManager = SchemaManager.getInstance(catalogStore);
4848
addService(schemaManager);
4949

50-
SessionFactory sessFactory = new SessionFactory(catalogStore, schemaManager);
50+
SessionFactory sessFactory = new SessionFactory(schemaManager);
5151
SessionServer sessServer = new SessionServer(sessFactory);
5252
addService(sessServer);
5353

0 commit comments

Comments
 (0)