Python API: sam v8_1_5 sam.translateConstraints()
|  |
This is the python interface to the command 'sam translate constraints'.
Command Description:
List the files that match the given dimensions. NOTE,
this does not TAKE a snapshot; it merely tells you what files would
be IN the snapshot if you were to take one using these
constraints.
If you like what you see with translate constraints, you should
then use "sam create dataset" to take a snapshot.
The --returnCountOnly option (or, equivalently, --count) will return
only the count of the number of files matching these constraints.
--fileInfo will print the size and number of events (if any) for each file
in the list.
--noSummary will not print any summary information, but just a simple list of
files, one per line. When combined with --fileInfo it will print the filename,
file size in bytes, and number of events in the file as tab separated fields.
If you are looking for help on dimensions, you should use the
sam get dimension info
command; but for backwards compatibility with one of the most stupid
things ever done in the original sam interface, we also allow the
sam translate constraints --dim=help [--type=<dimensionCategory>]
Python Usage:
from Sam import sam
result = sam.translateConstraints(...)
Return value: SamStruct.DataFilePhysicalAttributesList.DataFilePhysicalAttributesList
Arguments are passed as keyword-value pairs, as in:
myfunc(arg1='myarg', arg2='anotherarg', d=1)
Argument Keyword Description:
(*) indicates that this keyword is required
>>> indicates that either the API object or the CLI equivalent (<<<) is required
====================================================================================================================================
KEYWORD DATA TYPE DESCRIPTION
------------------------------------------------------------------------------------------------------------------------------------
c SamBoolean automatically close all servants after each method call
corbaCallTimeout int time in seconds for CORBA method calls to return before timing out (default: 0; zero implies no timeout)
d SamBoolean debug mode
(*) dimensions string string specifying the dimensional quantities of interest
fileInfo SamBoolean Display individual file size and event count
noSummary SamBoolean Do not show summary information; return a simple list of files only
retryInterval int retry interval base in seconds; will multiply this base times retryCount (default: 5)
retryJitter int retry jitter, random jitter added to base retry interval times retryCount (default: 5)
retryMaxCount int number of times to retry CORBA calls for retriable exceptions (default: 25; zero implies no retries)
returnCountOnly SamBoolean Return only the count of files matching the dimensions
s SamBoolean retrySilently mode (do not issue messages to stderr on proxy retries)
summaryOnly SamBoolean Only display the summary and not the file list
t SamBoolean time-it mode (print additional info on timings)
type string
v SamBoolean verbose mode
====================================================================================================================================
Mutually exclusive keywords:
(fileInfo || summaryOnly)
(returnCountOnly || fileInfo)
(returnCountOnly || noSummary || summaryOnly)
Environment Defaults:
c = os.environ['SAM_PYAPI_AUTO_CLOSE_SERVANTS']
corbaCallTimeout = os.environ['SAM_PYAPI_CORBA_CALL_TIMEOUT']
retryInterval = os.environ['SAM_PYAPI_RETRY_INTERVAL']
retryJitter = os.environ['SAM_PYAPI_RETRY_JITTER']
retryMaxCount = os.environ['SAM_PYAPI_RETRY_MAX_COUNT']
s = os.environ['SAM_PYAPI_RETRY_SILENTLY']
See Also: