Martin Sivák has posted comments on this change.
Change subject: broker: use direct I/O to read metadata
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Looks good.
....................................................
File ovirt_hosted_engine_ha/broker/storage_broker.py
Line 80: raise RequestError("failed to read metadata:
{0}".format(str(e)))
Line 81:
Line 82: return dict(((i / bs, data[i:i+bs])
Line 83: for i in range(0, len(data), bs)
Line 84: if data[i] != '\0'))
It works because he is generating a list of tuples. Dict comprehension uses
{k:v for ...} syntax.
Line 85:
Line 86: def put_stats(self, storage_dir, service_type, host_id, data):
Line 87: """
Line 88: Writes to the storage in file
<storage_dir>/<service-type>.metadata,
--
To view, visit http://gerrit.ovirt.org/19760
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I296977000ffa3fff3f9391f93a8b4f3f519eae4e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-hosted-engine-ha
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches