bharathv commented on a change in pull request #8:
URL: https://github.com/apache/hbase-native-client/pull/8#discussion_r443025886
##########
File path: src/hbase/test-util/test-util.cc
##########
@@ -18,81 +18,17 @@
*/
#include "hbase/test-util/test-util.h"
-#include <string.h>
-#include <folly/Format.h>
+#include <string>
+#include <limits.h>
+#include <unistd.h>
-#include "hbase/client/zk-util.h"
+using std::string;
-using hbase::TestUtil;
-using folly::Random;
-
-std::string TestUtil::RandString(int len) {
- // Create the whole string.
- // Filling everything with z's
- auto s = std::string(len, 'z');
-
- // Now pick a bunch of random numbers
- for (int i = 0; i < len; i++) {
- // use Folly's random to get the numbers
- // as I don't want to have to learn
- // all the cpp rand invocation magic.
- auto r = Random::rand32('a', 'z');
- // Cast that to ascii.
- s[i] = static_cast<char>(r);
+namespace hbase {
+ string TestUtil::get_exec_path() {
+ char result[ PATH_MAX ];
+ ssize_t count = readlink( "/proc/self/exe", result, PATH_MAX );
Review comment:
Good point, I missed it, thanks. Switched to
boost::dll::program_location for now and enforced min version to 1.6.1. That
should be ok I guess
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]