mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-3.0' into cassandra-3.11
This commit is contained in:
commit
57b0bb93ab
|
|
@ -7,6 +7,8 @@ Merged from 3.0:
|
|||
* Run evictFromMembership in GossipStage (CASSANDRA-15592)
|
||||
Merged from 2.2:
|
||||
* Disable JMX rebinding (CASSANDRA-15653)
|
||||
Merged from 2.1:
|
||||
* Fix parse error in cqlsh COPY FROM and formatting for map of blobs (CASSANDRA-15679)
|
||||
* Fix Commit log replays when static column clustering keys are collections (CASSANDRA-14365)
|
||||
* Fix Red Hat init script on newer systemd versions (CASSANDRA-15273)
|
||||
* Allow EXTRA_CLASSPATH to work on tar/source installations (CASSANDRA-15567)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ from cassandra.util import Date, Time
|
|||
|
||||
from cql3handling import CqlRuleSet
|
||||
from displaying import NO_COLOR_MAP
|
||||
from formatting import format_value_default, CqlType, DateTimeFormat, EMPTY, get_formatter
|
||||
from formatting import format_value_default, CqlType, DateTimeFormat, EMPTY, get_formatter, BlobType
|
||||
from sslhandling import ssl_settings
|
||||
|
||||
PROFILE_ON = False
|
||||
|
|
@ -1868,7 +1868,7 @@ class ImportConversion(object):
|
|||
return converters.get(t.typename, convert_unknown)(v, ct=t)
|
||||
|
||||
def convert_blob(v, **_):
|
||||
return bytearray.fromhex(v[2:])
|
||||
return BlobType(v[2:].decode("hex"))
|
||||
|
||||
def convert_text(v, **_):
|
||||
return v
|
||||
|
|
|
|||
|
|
@ -236,13 +236,20 @@ def formatter_for(typname):
|
|||
return f
|
||||
return registrator
|
||||
|
||||
class BlobType(object):
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
@formatter_for('bytearray')
|
||||
def __str__(self):
|
||||
return str(self.val)
|
||||
|
||||
@formatter_for('BlobType')
|
||||
def format_value_blob(val, colormap, **_):
|
||||
bval = '0x' + binascii.hexlify(val)
|
||||
return colorme(bval, colormap, 'blob')
|
||||
|
||||
|
||||
formatter_for('bytearray')(format_value_blob)
|
||||
formatter_for('buffer')(format_value_blob)
|
||||
formatter_for('blob')(format_value_blob)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue