NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
Common.hpp File Reference
#include <Identifiers/Identifiers.hpp>
#include <Sequencing/SequenceData.hpp>
#include <Util/Logger/Logger.hpp>
#include <charconv>
#include <functional>
#include <memory>
#include <sstream>
#include <string>
#include <string_view>
#include <vector>
Include dependency graph for Common.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  NES::Runtime::Execution::BufferMetaData
 Stores the meta date for a RecordBuffer. More...
 
struct  NES::Util::detail::SplitFunctionHelper< T >
 set of helper functions for splitting for different types More...
 
struct  NES::Util::detail::SplitFunctionHelper< std::string >
 

Namespaces

 NES
 This exception represents a network error.
 
 NES::QueryCompilation
 
 NES::Runtime
 Turn this on to have Thread::current_num_threads_ keep a count of currently-active threads.
 
 NES::Runtime::Execution
 
 NES::Util
 
 NES::Util::detail
 

Enumerations

enum class  NES::QueryCompilation::StreamJoinStrategy : uint8_t {
  NES::QueryCompilation::HASH_JOIN_LOCAL , NES::QueryCompilation::HASH_JOIN_VAR_SIZED , NES::QueryCompilation::HASH_JOIN_GLOBAL_LOCKING , NES::QueryCompilation::HASH_JOIN_GLOBAL_LOCK_FREE ,
  NES::QueryCompilation::NESTED_LOOP_JOIN
}
 
enum class  NES::QueryCompilation::JoinBuildSideType : uint8_t { NES::QueryCompilation::Right , NES::QueryCompilation::Left }
 

Functions

template<typename E = JoinBuildSideType, typename Out = uint64_t>
constexpr Out NES::QueryCompilation::to_underlying (E e) noexcept
 
std::string NES::Util::escapeJson (const std::string &str)
 escapes all non text characters in a input string, such that the string could be processed as json. More...
 
std::string_view NES::Util::trimWhiteSpaces (std::string_view in)
 removes leading and trailing whitespaces More...
 
std::string_view NES::Util::trimChar (std::string_view in, char trimFor)
 removes leading and trailing occurences of trimFor More...
 
bool NES::Util::endsWith (const std::string &fullString, const std::string &ending)
 Checks if a string ends with a given string. More...
 
uint64_t NES::Util::numberOfUniqueValues (std::vector< uint64_t > &values)
 Checks if a string starts with a given string. More...
 
bool NES::Util::startsWith (const std::string &fullString, const std::string &ending)
 Get number of unique elements. More...
 
std::string NES::Util::toUpperCase (std::string string)
 transforms the string to an upper case version More...
 
template<typename T >
std::vector< T > NES::Util::splitWithStringDelimiter (std::string_view inputString, std::string_view delim, std::function< T(std::string_view)> fromStringToT=detail::SplitFunctionHelper< T >::FUNCTION)
 splits a string given a delimiter into multiple substrings stored in a T vector the delimiter is allowed to be a string rather than a char only. More...
 
template<typename T >
std::shared_ptr< T > NES::Util::checkNonNull (std::shared_ptr< T > ptr, const std::string &errorMessage)
 this method checks if the object is null More...
 
void NES::Util::findAndReplaceAll (std::string &data, const std::string &toSearch, const std::string &replaceStr)
 function to replace all string occurrences More...
 
std::string NES::Util::replaceFirst (std::string origin, const std::string &search, const std::string &replace)
 This function replaces the first occurrence of search term in a string with the replace term. More...
 
std::string NES::Util::updateSourceName (std::string queryPlanSourceConsumed, std::string subQueryPlanSourceConsumed)
 : Update the source names by sorting and then concatenating the source names from the sub- and query plan More...
 
void NES::Util::writeHeaderToCsvFile (const std::string &csvFileName, const std::string &header)
 Truncates the file and then writes the header string as is to the file. More...
 
void NES::Util::writeRowToCsvFile (const std::string &csvFileName, const std::string &row)
 Appends the row as is to the csv file. More...
 
template<typename T >
std::vector< std::vector< T > > NES::Util::partition (const std::vector< T > &vec, size_t n)
 
template<typename T >
void NES::Util::padVectorToSize (std::vector< T > &vector, size_t newSize, T newValue)
 appends newValue until the vector contains a minimum of newSize elements More...
 
uint64_t NES::Util::murmurHash (uint64_t key)
 hashes the key with murmur hash More...
 
uint64_t NES::Util::countLines (const std::string &str)
 Counts the number of lines of a string. More...
 
uint64_t NES::Util::countLines (std::istream &stream)
 Counts the number of lines of a stream, e.g., a file. More...
 
template<typename T >
void NES::Util::updateAtomicMax (std::atomic< T > &curVal, const T &newVal)
 Tries to update curVal until it succeeds or curVal is larger then newVal. More...