Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FLUME-669: Changes required for recent Thrift IDL and Makefile update…

…d with recent directory structure
  • Loading branch information...
commit e547332df34153639761dce525e3b4ea03346340 1 parent 3881b32
Dani Rayan authored jmhsieh committed
View
5 contrib/flogger/Makefile
@@ -19,6 +19,7 @@
CC = g++
SRCS = src/cpp/ThriftThinFlumeRPC.cpp
THRIFT_SRCS = gen-cpp/ThriftFlumeEventServer.cpp gen-cpp/flume_constants.cpp gen-cpp/flume_types.cpp src/cpp/ThriftThinFlumeRPC.cpp
+FLUME_THRIFT_IDL = ../../flume-core/src/main/thrift/flume.thrift
OBJS = gen-cpp/ThriftFlume.o gen-cpp/ThriftFlumeConstants.o gen-cpp/ThriftFlumeTypes.o
.PHONY: all
@@ -34,8 +35,8 @@ flogger: ${OBJS}
${OBJS}: ${THRIFT_SRCS}
-${THRIFT_SRCS}: ../../src/thrift/flume.thrift
- thrift --gen cpp ../../src/thrift/flume.thrift
+${THRIFT_SRCS}: ${FLUME_THRIFT_IDL}
+ thrift --gen cpp ${FLUME_THRIFT_IDL}
.PHONY: clean
clean:
View
13 contrib/flogger/src/cpp/ThriftThinFlumeRPC.cpp
@@ -40,7 +40,7 @@ using namespace apache::thrift::transport;
/*
* The main function takes -h localhost:port-number and -t tag_key:value as arguments.
* It forms a flume event structure with time-stamp taken from the system clock and hostname.
- * It sends the request to the flume node listening on the host-port specified
+ * It sends the request to the flume node listening on the host-port specified
* Returns 0 on success, returns 1 on failure, error codes not yet defined
*/
@@ -52,9 +52,9 @@ int main(int argc, char **argv) {
switch(argc)
{
case 3:
- if(0 == strcmp(argv[1], HOST_ARG)) {
+ if(0 == strcmp(argv[1], HOST_ARG)) {
host_port = argv[2];
- } else {
+ } else {
cout << "\tUsage: [-h <hostname>:<port>] is mandatory" << endl;
exit(1);
}
@@ -125,7 +125,7 @@ int main(int argc, char **argv) {
cerr << "\n\tError: Cannot get hostname" << endl;
exit(1);
}
-
+
map <string,string> tag;
if(argc == 5)
{
@@ -143,14 +143,15 @@ int main(int argc, char **argv) {
*/
ThriftFlumeEvent evt;
- evt.priority = INFO;
+ Priority evt_priority;
+ evt.priority = evt_priority.INFO;
struct timespec t_nanos;
if(0 == clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t_nanos)) {
evt.nanos = t_nanos.tv_sec * 1000000000LL + t_nanos.tv_nsec;
} else {
cerr << "\n\tCannot read process cputime clock, quitting";
exit(1);
- }
+ }
struct timespec t_stamp;
if(0 == clock_gettime(CLOCK_REALTIME, &t_stamp)) {
Please sign in to comment.
Something went wrong with that request. Please try again.