@@ -96,8 +96,8 @@ GetRequest::GetRequest(Client* client, const std::vector<ObjectID>& object_ids)
9696
9797Client::Client (int fd) : fd(fd) {}
9898
99- PlasmaStore::PlasmaStore (EventLoop* loop, int64_t system_memory,
100- std::string directory, bool hugepages_enabled)
99+ PlasmaStore::PlasmaStore (EventLoop* loop, int64_t system_memory, std::string directory,
100+ bool hugepages_enabled)
101101 : loop_(loop), eviction_policy_(&store_info_) {
102102 store_info_.memory_capacity = system_memory;
103103 store_info_.directory = directory;
@@ -117,9 +117,7 @@ PlasmaStore::~PlasmaStore() {
117117 }
118118}
119119
120- const PlasmaStoreInfo* PlasmaStore::get_plasma_store_info () {
121- return &store_info_;
122- }
120+ const PlasmaStoreInfo* PlasmaStore::get_plasma_store_info () { return &store_info_; }
123121
124122// If this client is not already using the object, add the client to the
125123// object's list of clients, otherwise do nothing.
@@ -644,8 +642,8 @@ class PlasmaStoreRunner {
644642 bool hugepages_enabled) {
645643 // Create the event loop.
646644 loop_.reset (new EventLoop);
647- store_.reset (new PlasmaStore (loop_. get (), system_memory, directory,
648- hugepages_enabled));
645+ store_.reset (
646+ new PlasmaStore (loop_. get (), system_memory, directory, hugepages_enabled));
649647 plasma_config = store_->get_plasma_store_info ();
650648 int socket = bind_ipc_sock (socket_name, true );
651649 // TODO(pcm): Check return value.
@@ -680,8 +678,8 @@ void HandleSignal(int signal) {
680678 }
681679}
682680
683- void start_server (char * socket_name, int64_t system_memory,
684- std::string plasma_directory, bool hugepages_enabled) {
681+ void start_server (char * socket_name, int64_t system_memory, std::string plasma_directory,
682+ bool hugepages_enabled) {
685683 // Ignore SIGPIPE signals. If we don't do this, then when we attempt to write
686684 // to a client that has already died, the store could die.
687685 signal (SIGPIPE, SIG_IGN);
@@ -733,7 +731,8 @@ int main(int argc, char* argv[]) {
733731 ARROW_LOG (FATAL) << " please specify the amount of system memory with -m switch" ;
734732 }
735733 if (hugepages_enabled && plasma_directory.empty ()) {
736- ARROW_LOG (FATAL) << " if you want to use hugepages, please specify path to huge pages filesystem with -d" ;
734+ ARROW_LOG (FATAL) << " if you want to use hugepages, please specify path to huge pages "
735+ " filesystem with -d" ;
737736 }
738737 if (plasma_directory.empty ()) {
739738#ifdef __linux__
@@ -743,7 +742,8 @@ int main(int argc, char* argv[]) {
743742#endif
744743 }
745744 ARROW_LOG (INFO) << " Starting object store with directory " << plasma_directory
746- << " and huge page support " << (hugepages_enabled ? " enabled" : " disabled" );
745+ << " and huge page support "
746+ << (hugepages_enabled ? " enabled" : " disabled" );
747747#ifdef __linux__
748748 if (!hugepages_enabled) {
749749 // On Linux, check that the amount of memory available in /dev/shm is large
@@ -756,21 +756,19 @@ int main(int argc, char* argv[]) {
756756 int64_t shm_mem_avail = shm_vfs_stats.f_bsize * shm_vfs_stats.f_bavail ;
757757 close (shm_fd);
758758 if (system_memory > shm_mem_avail) {
759- ARROW_LOG (FATAL) << " System memory request exceeds memory available in "
760- << plasma_directory << " . The request is for "
761- << system_memory << " bytes, and the amount available is "
762- << shm_mem_avail
763- << " bytes. You may be able to free up space by deleting files in "
764- " /dev/shm. If you are inside a Docker container, you may need to "
765- " pass "
766- " an argument with the flag '--shm-size' to 'docker run'." ;
759+ ARROW_LOG (FATAL)
760+ << " System memory request exceeds memory available in " << plasma_directory
761+ << " . The request is for " << system_memory
762+ << " bytes, and the amount available is " << shm_mem_avail
763+ << " bytes. You may be able to free up space by deleting files in "
764+ " /dev/shm. If you are inside a Docker container, you may need to "
765+ " pass an argument with the flag '--shm-size' to 'docker run'." ;
767766 }
768767 }
769768#endif
770769 // Make it so dlmalloc fails if we try to request more memory than is
771770 // available.
772771 plasma::dlmalloc_set_footprint_limit ((size_t )system_memory);
773772 ARROW_LOG (DEBUG) << " starting server listening on " << socket_name;
774- plasma::start_server (socket_name, system_memory, plasma_directory,
775- hugepages_enabled);
773+ plasma::start_server (socket_name, system_memory, plasma_directory, hugepages_enabled);
776774}
0 commit comments