Skip to content

Commit

Permalink
Remove unused OperationType Code
Browse files Browse the repository at this point in the history
  • Loading branch information
HangyuanLiu committed Sep 20, 2024
1 parent 51501da commit 5840c81
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 1,214 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@

import com.google.common.collect.Lists;
import com.google.gson.annotations.SerializedName;
import com.starrocks.cluster.ClusterNamespace;
import com.starrocks.common.Pair;
import com.starrocks.common.io.Text;
import com.starrocks.common.io.Writable;
import com.starrocks.persist.gson.GsonUtils;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.List;
Expand Down Expand Up @@ -53,29 +52,8 @@ public List<Pair<String, String>> getProperties() {
return properties;
}

public static UserPropertyInfo read(DataInput in) throws IOException {
UserPropertyInfo info = new UserPropertyInfo();
info.readFields(in);
return info;
}

@Override
public void write(DataOutput out) throws IOException {
Text.writeString(out, ClusterNamespace.getFullName(user));
out.writeInt(properties.size());
for (Pair<String, String> entry : properties) {
Text.writeString(out, entry.first);
Text.writeString(out, entry.second);
}
}

public void readFields(DataInput in) throws IOException {
user = ClusterNamespace.getNameFromFullName(Text.readString(in));
int size = in.readInt();
for (int i = 0; i < size; i++) {
String key = Text.readString(in);
String val = Text.readString(in);
properties.add(Pair.create(key, val));
}
Text.writeString(out, GsonUtils.GSON.toJson(this));
}
}
7 changes: 0 additions & 7 deletions fe/fe-core/src/main/java/com/starrocks/backup/RestoreJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.List;
Expand Down Expand Up @@ -1742,12 +1741,6 @@ private void setTableStateToNormal(Database db) {
}
}

public static RestoreJob read(DataInput in) throws IOException {
RestoreJob job = new RestoreJob();
job.readFields(in);
return job;
}

@Override
public void write(DataOutput out) throws IOException {
super.write(out);
Expand Down
13 changes: 2 additions & 11 deletions fe/fe-core/src/main/java/com/starrocks/ha/LeaderInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import com.google.gson.annotations.SerializedName;
import com.starrocks.common.io.Text;
import com.starrocks.common.io.Writable;
import com.starrocks.persist.gson.GsonUtils;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

Expand Down Expand Up @@ -72,15 +72,6 @@ public void setRpcPort(int rpcPort) {

@Override
public void write(DataOutput out) throws IOException {
Text.writeString(out, ip);
out.writeInt(httpPort);
out.writeInt(rpcPort);
Text.writeString(out, GsonUtils.GSON.toJson(this));
}

public void readFields(DataInput in) throws IOException {
ip = Text.readString(in);
httpPort = in.readInt();
rpcPort = in.readInt();
}

}
Loading

0 comments on commit 5840c81

Please sign in to comment.