Exemplo n.º 1
0
 def setMetadata(self, metric, key, value):
     node = self.tree.getNode(TaggedSeries.encode(metric))
     metadata = node.readMetadata()
     metadata[key] = value
     node.writeMetadata(metadata)
Exemplo n.º 2
0
 def getFilesystemPath(self, metric):
     return self.tree.getFilesystemPath(TaggedSeries.encode(metric))
Exemplo n.º 3
0
 def create(self, metric, retentions, xfilesfactor, aggregation_method):
     self.tree.createNode(TaggedSeries.encode(metric),
                          retentions=retentions,
                          timeStep=retentions[0][0],
                          xFilesFactor=xfilesfactor,
                          aggregationMethod=aggregation_method)
Exemplo n.º 4
0
 def getMetadata(self, metric, key):
     return self.tree.getNode(
         TaggedSeries.encode(metric)).readMetadata()[key]
Exemplo n.º 5
0
 def write(self, metric, datapoints):
     self.tree.store(TaggedSeries.encode(metric), datapoints)
Exemplo n.º 6
0
 def exists(self, metric):
     return self.tree.hasNode(TaggedSeries.encode(metric))
Exemplo n.º 7
0
 def getFilesystemPath(self, metric):
     return join(self.data_dir,
                 TaggedSeries.encode(metric, sep) + '.wsp')
Exemplo n.º 8
0
 def encode(self, metric, tag_hash_filenames=None):
   if tag_hash_filenames is None:
     tag_hash_filenames = self.tag_hash_filenames
   return TaggedSeries.encode(metric, hash_only=tag_hash_filenames)
Exemplo n.º 9
0
 def _getFilesystemPath(self, metric, tag_hash_filenames):
   return join(
     self.data_dir,
     TaggedSeries.encode(metric, sep, hash_only=tag_hash_filenames) + '.wsp'
   )
Exemplo n.º 10
0
 def encode(self, metric, tag_hash_filenames=None):
     if tag_hash_filenames is None:
         tag_hash_filenames = self.tag_hash_filenames
     return TaggedSeries.encode(metric, hash_only=tag_hash_filenames)
Exemplo n.º 11
0
 def _getFilesystemPath(self, metric, tag_hash_filenames):
     return join(
         self.data_dir,
         TaggedSeries.encode(metric, sep, hash_only=tag_hash_filenames)
         + '.wsp')