Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: minor refactor for v0.5.0 #13

Merged
merged 10 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ingester-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>greptimedb-ingester</artifactId>
<groupId>io.greptime</groupId>
<version>0.4.0</version>
<version>0.5.0</version>
</parent>

<artifactId>ingester-all</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ingester-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>greptimedb-ingester</artifactId>
<groupId>io.greptime</groupId>
<version>0.4.0</version>
<version>0.5.0</version>
</parent>

<artifactId>ingester-common</artifactId>
Expand Down
9 changes: 8 additions & 1 deletion ingester-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>greptimedb-ingester</artifactId>
<groupId>io.greptime</groupId>
<version>0.4.0</version>
<version>0.5.0</version>
</parent>

<artifactId>ingester-example</artifactId>
Expand Down Expand Up @@ -38,5 +38,12 @@
<artifactId>log4j-slf4j-impl</artifactId>
<scope>compile</scope>
</dependency>

<!-- MySQL usage dependency -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,29 @@
import io.greptime.models.Column;
import io.greptime.models.DataType;
import io.greptime.models.Metric;
import java.util.Date;

/**
* @author jiachun.fjc
*/
@Metric(name = "my_metric2")
public class MyMetric2 {
@Column(name = "tag1", tag = true, dataType = DataType.String)
private String tag1;
@Column(name = "tag2", tag = true, dataType = DataType.String)
private String tag2;
@Metric(name = "cpu_metric")
public class Cpu {
@Column(name = "host", tag = true, dataType = DataType.String)
private String host;

@Column(name = "ts", timestamp = true, dataType = DataType.TimestampSecond)
@Column(name = "ts", timestamp = true, dataType = DataType.TimestampMillisecond)
private long ts;

@Column(name = "field1", dataType = DataType.Date)
private Date field1;
@Column(name = "field2", dataType = DataType.Float64)
private double field2;
@Column(name = "cpu_user", dataType = DataType.Float64)
private double cpuUser;
@Column(name = "cpu_sys", dataType = DataType.Float64)
private double cpuSys;

public String getTag1() {
return tag1;
public String getHost() {
return host;
}

public void setTag1(String tag1) {
this.tag1 = tag1;
}

public String getTag2() {
return tag2;
}

public void setTag2(String tag2) {
this.tag2 = tag2;
public void setHost(String host) {
this.host = host;
}

public long getTs() {
Expand All @@ -62,19 +51,19 @@ public void setTs(long ts) {
this.ts = ts;
}

public Date getField1() {
return field1;
public double getCpuUser() {
return cpuUser;
}

public void setField1(Date field1) {
this.field1 = field1;
public void setCpuUser(double cpuUser) {
this.cpuUser = cpuUser;
}

public double getField2() {
return field2;
public double getCpuSys() {
return cpuSys;
}

public void setField2(double field2) {
this.field2 = field2;
public void setCpuSys(double cpuSys) {
this.cpuSys = cpuSys;
}
}
59 changes: 59 additions & 0 deletions ingester-example/src/main/java/io/greptime/Memory.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright 2023 Greptime Team
*
* Licensed 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 io.greptime;

import io.greptime.models.Column;
import io.greptime.models.DataType;
import io.greptime.models.Metric;

/**
* @author jiachun.fjc
*/
@Metric(name = "mem_metric")
public class Memory {
@Column(name = "host", tag = true, dataType = DataType.String)
private String host;

@Column(name = "ts", timestamp = true, dataType = DataType.TimestampMillisecond)
private long ts;

@Column(name = "mem_usage", dataType = DataType.Float64)
private double memUsage;

public String getHost() {
return host;
}

public void setHost(String host) {
this.host = host;
}

public long getTs() {
return ts;
}

public void setTs(long ts) {
this.ts = ts;
}

public double getMemUsage() {
return memUsage;
}

public void setMemUsage(double memUsage) {
this.memUsage = memUsage;
}
}
110 changes: 0 additions & 110 deletions ingester-example/src/main/java/io/greptime/MyMetric1.java

This file was deleted.

Loading
Loading