ProtoBuf3中新增了TimeStamp类型,使用示例如下:
syntax = "proto3";
import public "google/protobuf/timestamp.proto"; message MonitorData {
google.protobuf.Timestamp Time = ;//收集时间
int64 LongValue = ;//监控值--长整型
string MetaData = ;//监控元数据ID
string Ins = ;//监控元数据实例
string Host = ;//应用节点ApplicationNode
string ServiceHost = ;//服务宿主ApplicationHost
string StringValue = ;//监控值--字符串
double DoubleValue = ;//监控值--浮点型
map<string, string> Tags = ;//监控数据维度字典
map<string, string> Ext = ;//扩展属性
string Cluster = ;//集群
string RowKey = ;//RowKey
}

根据.proto文件生成对应的Java类:

D:\tmp>protoc.exe -I=d:/tmp --java_out=d:/tmp d:/tmp/monitordata.proto

注:protoc下载:

http://repo1.maven.org/maven2/com/google/protobuf/protoc/

Protocol Buffer 时间类型定义的更多相关文章

  1. gRPC in ASP.NET Core 3.x -- Protocol Buffer(3)更新消息类型

    当你第一次定义Protocol Buffer的消息的时候,你肯定会给消息设定一套规则需求.但是随着时间的推进,你的业务可能会发生了变化,与此同时,你的Protocol Buffer消息类型的需求也会随 ...

  2. Protocol Buffer详解

    1.Protocol Buffer 概念 Google Protocol Buffer( 简称 Protobuf) 是 Google 公司内部的混合语言数据标准,目前已经正在使用的有超过 48,162 ...

  3. 快来看看Google出品的Protocol Buffer,别只会用Json和XML了

    前言 习惯用 Json.XML 数据存储格式的你们,相信大多都没听过Protocol Buffer Protocol Buffer 其实 是 Google出品的一种轻量 & 高效的结构化数据存 ...

  4. 快来看看Google出品的Protocol Buffer,别仅仅会用Json和XML了

    前言 习惯用 Json.XML 数据存储格式的你们,相信大多都没听过Protocol Buffer Protocol Buffer 事实上 是 Google出品的一种轻量 & 高效的结构化数据 ...

  5. Google Protocol Buffer的安装与.proto文件的定义

    什么是protocol Buffer呢? Google Protocol Buffer( 简称 Protobuf) 是 Google 公司内部的混合语言数据标准. 我理解的就是:它是一种轻便高效的结构 ...

  6. google protocol buffer -2-.proto 定义规则

    essage为主要关键字,类似于java中的class.定义简单message类型 SearchRequest.proto定义了每个查询请求的消息格式,每个请求都会有查询关键词query,查询结果的页 ...

  7. Google Protocol Buffer的安装与.proto文件的定义(转)

    转自(https://www.cnblogs.com/yinheyi/p/6080244.html) 什么是protocol Buffer呢? Google Protocol Buffer( 简称 P ...

  8. [原创翻译]Protocol Buffer Basics: C#

    Protocol Buffer 基础知识:c#    原文地址:https://developers.google.com/protocol-buffers/docs/csharptutorial   ...

  9. Google Protocol Buffer 的使用和原理[转]

    本文转自: http://www.ibm.com/developerworks/cn/linux/l-cn-gpb/ Protocol Buffers 是一种轻便高效的结构化数据存储格式,可以用于结构 ...

随机推荐

  1. [转载] Redis系统性介绍

    转载自http://blog.nosqlfan.com/html/3139.html?ref=rediszt 虽然Redis已经很火了,相信还是有很多同学对Redis只是有所听闻或者了解并不全面,下面 ...

  2. android TransFormexecption 解决

    近期编译的时候遇到这个问题.... > com.android.build.api.transform.Transformexception: java.util.zip.ZipExceptio ...

  3. A workaround to change shared memory size for Docker containers in AWS ECS

    Issue Because of not supporting to specify the following docker run parameter, containers in ECS can ...

  4. mysql的复杂查询,连接数据库

    1.MySQL的工具:Navicat 优点:方便2.数据库的导入 mysqldump -u用户名 -p密码 数据库名称 > 导出文集路径 #结构+数据 mysqldump -u用户名 -p密码 ...

  5. This package contains perl-5.16.3, java8, nifi-1.1.2 on ubuntu:14.04

    [How to build:]cd /home/ops/work/demo/docker/aws/srctouch Dockerfiledocker build -t aws_src_image:v1 ...

  6. C#检测获取移动硬盘盘符

    最近做一个小工具,  C# 对 移动硬盘的检测, var arr = DriveInfo.GetDrives(); 得出的所有磁盘,发现对于移动硬盘,DriveType 不是 Removable 类型 ...

  7. 实际应用中遇到TimedRotatingFileHandler不滚动的问题

    需求: 程序每天晚上8点和10点定时运行,期望日志按日期记录 添加Handler部分代码如下: formatter = logging.Formatter("%(asctime)s %(fi ...

  8. 异常处理-try catch

    一:try catch是什么 try catch是java程序设计中处理异常的重要组成部分 异常是程序中的一些错误,有些异常需要做处理,有些则不需要捕获处理,异常是针对方法来说的,抛出.声明抛出.捕获 ...

  9. poj 2456 Aggressive cows && nyoj 疯牛 最大化最小值 二分

    poj 2456 Aggressive cows && nyoj 疯牛 最大化最小值 二分 题目链接: nyoj : http://acm.nyist.net/JudgeOnline/ ...

  10. python中csv文件的读取问题

    在python读取csv格式的文件时,使用csv.reader读取文件对象,出现了line contains NULL byte的错误,如下: reader = csv.reader(open(fil ...