-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
942ab5c
commit 4d9fca9
Showing
15 changed files
with
735 additions
and
263 deletions.
There are no files selected for viewing
110 changes: 110 additions & 0 deletions
110
ingester-example/src/main/java/io/greptime/MyMetric1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* | ||
* 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; | ||
import java.math.BigDecimal; | ||
|
||
/** | ||
* @author jiachun.fjc | ||
*/ | ||
@Metric(name = "my_metric1") | ||
public class MyMetric1 { | ||
@Column(name = "tag1", tag = true, dataType = DataType.String) | ||
private String tag1; | ||
@Column(name = "tag2", tag = true, dataType = DataType.String) | ||
private String tag2; | ||
@Column(name = "tag3", tag = true, dataType = DataType.String) | ||
private String tag3; | ||
|
||
@Column(name = "ts", timestamp = true, dataType = DataType.TimestampMillisecond) | ||
private long ts; | ||
|
||
@Column(name = "field1", dataType = DataType.String) | ||
private String field1; | ||
@Column(name = "field2", dataType = DataType.Float64) | ||
private double field2; | ||
@Column(name = "field3", dataType = DataType.Decimal128) | ||
private BigDecimal field3; | ||
@Column(name = "field4", dataType = DataType.Int32) | ||
private int field4; | ||
|
||
public String getTag1() { | ||
return tag1; | ||
} | ||
|
||
public void setTag1(String tag1) { | ||
this.tag1 = tag1; | ||
} | ||
|
||
public String getTag2() { | ||
return tag2; | ||
} | ||
|
||
public void setTag2(String tag2) { | ||
this.tag2 = tag2; | ||
} | ||
|
||
public String getTag3() { | ||
return tag3; | ||
} | ||
|
||
public void setTag3(String tag3) { | ||
this.tag3 = tag3; | ||
} | ||
|
||
public long getTs() { | ||
return ts; | ||
} | ||
|
||
public void setTs(long ts) { | ||
this.ts = ts; | ||
} | ||
|
||
public String getField1() { | ||
return field1; | ||
} | ||
|
||
public void setField1(String field1) { | ||
this.field1 = field1; | ||
} | ||
|
||
public double getField2() { | ||
return field2; | ||
} | ||
|
||
public void setField2(double field2) { | ||
this.field2 = field2; | ||
} | ||
|
||
public BigDecimal getField3() { | ||
return field3; | ||
} | ||
|
||
public void setField3(BigDecimal field3) { | ||
this.field3 = field3; | ||
} | ||
|
||
public int getField4() { | ||
return field4; | ||
} | ||
|
||
public void setField4(int field4) { | ||
this.field4 = field4; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* 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; | ||
import java.math.BigDecimal; | ||
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; | ||
|
||
@Column(name = "ts", timestamp = true, dataType = DataType.TimestampSecond) | ||
private long ts; | ||
|
||
@Column(name = "field1", dataType = DataType.Date) | ||
private Date field1; | ||
@Column(name = "field2", dataType = DataType.Float64) | ||
private double field2; | ||
|
||
public String getTag1() { | ||
return tag1; | ||
} | ||
|
||
public void setTag1(String tag1) { | ||
this.tag1 = tag1; | ||
} | ||
|
||
public String getTag2() { | ||
return tag2; | ||
} | ||
|
||
public void setTag2(String tag2) { | ||
this.tag2 = tag2; | ||
} | ||
|
||
public long getTs() { | ||
return ts; | ||
} | ||
|
||
public void setTs(long ts) { | ||
this.ts = ts; | ||
} | ||
|
||
public Date getField1() { | ||
return field1; | ||
} | ||
|
||
public void setField1(Date field1) { | ||
this.field1 = field1; | ||
} | ||
|
||
public double getField2() { | ||
return field2; | ||
} | ||
|
||
public void setField2(double field2) { | ||
this.field2 = field2; | ||
} | ||
} |
158 changes: 0 additions & 158 deletions
158
ingester-example/src/main/java/io/greptime/QuickStart.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.