Skip to content

Commit 64aeadd

Browse files
Andrea Masciottakenneth-jia
authored andcommitted
Remove of nested namespaces for C++14 compatibility
1 parent 9747c63 commit 64aeadd

15 files changed

+63
-15
lines changed

include/kafka/AdminClient.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
#include <vector>
1919

2020

21-
namespace KAFKA_API::clients {
21+
namespace KAFKA_API {
22+
namespace clients {
2223

2324
/**
2425
* The administrative client for Kafka, which supports managing and inspecting topics, etc.
@@ -341,5 +342,6 @@ AdminClient::deleteRecords(const TopicPartitionOffsets& topicPartitionOffsets,
341342
return admin::DeleteRecordsResult(combineErrors(errors));
342343
}
343344

345+
}
344346
} // end of KAFKA_API::clients
345347

include/kafka/AdminClientConfig.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
#include <kafka/Properties.h>
66

77

8-
namespace KAFKA_API::clients::admin {
8+
namespace KAFKA_API {
9+
namespace clients {
10+
namespace admin {
911

1012
/**
1113
* Configuration for the Kafka Consumer.
@@ -40,5 +42,7 @@ class Config: public Properties
4042
static const constexpr char* SASL_KERBEROS_SERVICE_NAME = "sasl.kerberos.service.name";
4143
};
4244

45+
}
46+
}
4347
} // end of KAFKA_API::clients::admin
4448

include/kafka/AdminCommon.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
#include <kafka/Types.h>
77

88

9-
namespace KAFKA_API::clients::admin {
9+
namespace KAFKA_API {
10+
namespace clients {
11+
namespace admin {
1012

1113
/**
1214
* The result of AdminClient::createTopics().
@@ -66,5 +68,7 @@ struct ListTopicsResult
6668
Topics topics;
6769
};
6870

71+
}
72+
}
6973
} // end of KAFKA_API::clients::admin
7074

include/kafka/ConsumerCommon.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
#include <functional>
1212

1313

14-
namespace KAFKA_API::clients::consumer {
14+
namespace KAFKA_API {
15+
namespace clients {
16+
namespace consumer {
1517

1618
/**
1719
* To identify which kind of re-balance event is handling, when the set of partitions assigned to the consumer changes.
@@ -61,5 +63,7 @@ namespace KAFKA_API::clients::consumer {
6163
rd_kafka_consumer_group_metadata_unique_ptr _rkConsumerGroupMetadata;
6264
};
6365

66+
}
67+
}
6468
} // end of KAFKA_API::clients::consumer
6569

include/kafka/ConsumerConfig.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
#include <kafka/Properties.h>
66

77

8-
namespace KAFKA_API::clients::consumer {
8+
namespace KAFKA_API {
9+
namespace clients {
10+
namespace consumer {
911

1012
/**
1113
* Configuration for the Kafka Consumer.
@@ -111,5 +113,7 @@ class Config: public Properties
111113
static const constexpr char* SASL_KERBEROS_SERVICE_NAME = "sasl.kerberos.service.name";
112114
};
113115

116+
}
117+
}
114118
} // end of KAFKA_API::clients::consumer
115119

include/kafka/ConsumerRecord.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
#include <sstream>
1313

1414

15-
namespace KAFKA_API::clients::consumer {
15+
namespace KAFKA_API {
16+
namespace clients {
17+
namespace consumer {
1618

1719
/**
1820
* A key/value pair to be received from Kafka.
@@ -150,5 +152,7 @@ ConsumerRecord::toString() const
150152
return oss.str();
151153
}
152154

155+
}
156+
}
153157
} // end of KAFKA_API::clients::consumer
154158

include/kafka/KafkaClient.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
#include <thread>
2323

2424

25-
namespace KAFKA_API::clients {
25+
namespace KAFKA_API {
26+
namespace clients {
2627

2728
/**
2829
* The base class for Kafka clients.
@@ -623,5 +624,6 @@ KafkaClient::fetchBrokerMetadata(const std::string& topic, std::chrono::millisec
623624
}
624625

625626

627+
}
626628
} // end of KAFKA_API::clients
627629

include/kafka/KafkaConsumer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
#include <memory>
1818

1919

20-
namespace KAFKA_API::clients {
20+
namespace KAFKA_API {
21+
namespace clients {
2122

2223
/**
2324
* KafkaConsumer class.
@@ -1039,5 +1040,6 @@ KafkaConsumer::commitAsync(const consumer::OffsetCommitCallback& offsetCommitCal
10391040
commitAsync(TopicPartitionOffsets(), offsetCommitCallback);
10401041
}
10411042

1043+
}
10421044
} // end of KAFKA_API::clients
10431045

include/kafka/KafkaProducer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
#include <unordered_map>
2020

2121

22-
namespace KAFKA_API::clients {
22+
namespace KAFKA_API {
23+
namespace clients {
2324

2425
/**
2526
* KafkaProducer class.
@@ -511,5 +512,6 @@ KafkaProducer::sendOffsetsToTransaction(const TopicPartitionOffsets& t
511512
KAFKA_THROW_IF_WITH_ERROR(result);
512513
}
513514

515+
}
514516
} // end of KAFKA_API::clients
515517

include/kafka/ProducerCommon.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
#include <memory>
1414

1515

16-
namespace KAFKA_API::clients::producer {
16+
namespace KAFKA_API {
17+
namespace clients {
18+
namespace producer {
1719

1820
/**
1921
* The metadata for a record that has been acknowledged by the server.
@@ -181,5 +183,7 @@ class RecordMetadata
181183
*/
182184
using Callback = std::function<void(const RecordMetadata& metadata, const Error& error)>;
183185

186+
}
187+
}
184188
} // end of KAFKA_API::clients::producer
185189

0 commit comments

Comments
 (0)