Skip to content

Commit

Permalink
add ttl column family
Browse files Browse the repository at this point in the history
  • Loading branch information
akhileshh committed Aug 6, 2023
1 parent c1e9eb2 commit a346c3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pychunkedgraph/graph/client/bigtable/client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pylint: disable=invalid-name, missing-docstring, import-outside-toplevel, line-too-long, protected-access, arguments-differ, arguments-renamed, logging-fstring-interpolation
# pylint: disable=invalid-name, missing-docstring, import-outside-toplevel, line-too-long, protected-access, arguments-differ, arguments-renamed, logging-fstring-interpolation, too-many-arguments

import sys
import time
Expand All @@ -15,11 +15,12 @@
from google.api_core.exceptions import Aborted
from google.api_core.exceptions import DeadlineExceeded
from google.api_core.exceptions import ServiceUnavailable
from google.cloud.bigtable.column_family import MaxAgeGCRule
from google.cloud.bigtable.column_family import MaxVersionsGCRule
from google.cloud.bigtable.table import Table
from google.cloud.bigtable.row_set import RowSet
from google.cloud.bigtable.row_data import PartialRowData
from google.cloud.bigtable.row_filters import RowFilter
from google.cloud.bigtable.column_family import MaxVersionsGCRule

from . import utils
from . import BigTableConfig
Expand Down Expand Up @@ -637,6 +638,8 @@ def _create_column_families(self):
f.create()
f = self._table.column_family("3")
f.create()
f = self._table.column_family("4", gc_rule=MaxAgeGCRule(datetime.timedelta(days=1)))
f.create()

def _get_ids_range(self, key: bytes, size: int) -> typing.Tuple:
"""Returns a range (min, max) of IDs for a given `key`."""
Expand Down

0 comments on commit a346c3c

Please sign in to comment.