Esempio 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)
Esempio n. 2
0
 def getFilesystemPath(self, metric):
     return self.tree.getFilesystemPath(TaggedSeries.encode(metric))
Esempio 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)
Esempio n. 4
0
 def getMetadata(self, metric, key):
     return self.tree.getNode(
         TaggedSeries.encode(metric)).readMetadata()[key]
Esempio n. 5
0
 def write(self, metric, datapoints):
     self.tree.store(TaggedSeries.encode(metric), datapoints)
Esempio n. 6
0
 def exists(self, metric):
     return self.tree.hasNode(TaggedSeries.encode(metric))
Esempio n. 7
0
 def getFilesystemPath(self, metric):
     return join(self.data_dir,
                 TaggedSeries.encode(metric, sep) + '.wsp')
Esempio 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)
Esempio 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'
   )
Esempio 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)
Esempio 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')