Module Import alias Import alias Import alias Import alias Import alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr BinOpMod Str AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Str Str NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad body Assign NameStore BinOpMod Str Call NameLoad NameLoad Assign NameStore ListLoad AttributeLoad NameLoad attr Str NameLoad Str NameLoad Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad keyword Num keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareEq Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Str Str Str NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareEq Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Str Str Str Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareEq Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Str Str Str Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareEq Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Str Str Str Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareEq Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Str Str Str Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad body Expr Str Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd ListLoad AttributeLoad NameLoad attr Str Str NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad body Expr Str Return Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd ListLoad AttributeLoad NameLoad attr Str Str NameLoad ListLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Str Str Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad body Expr Str Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd ListLoad AttributeLoad NameLoad attr Str Str NameLoad NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd ListLoad AttributeLoad NameLoad attr Str Str NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults ListLoad NameLoad body Return Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd ListLoad AttributeLoad NameLoad attr Str Str NameLoad ListLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults ListLoad body Return Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd ListLoad AttributeLoad NameLoad attr Str Str NameLoad ListLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults ListLoad body Return Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd ListLoad AttributeLoad NameLoad attr Str Str NameLoad ListLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults ListLoad NameLoad body Return Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd ListLoad AttributeLoad NameLoad attr Str Str NameLoad ListLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Str Str Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Print Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return SubscriptLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Raise Call NameLoad Str Assign NameStore ListLoad AttributeLoad NameLoad attr Str NameLoad Str Str Str If NameLoad body Expr Call AttributeLoad NameLoad attr ListLoad Str BinOpMod Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body While CompareIs Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Print TupleLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr Str body If BoolOpOr UnaryOpNot NameLoad Call AttributeLoad NameLoad attr Str body Continue Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Dict If CompareEq NameLoad Str body Assign NameStore Num Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str attr Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr Str body If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareEq Call NameLoad NameLoad Num body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str NameLoad orelse If CompareEq Call NameLoad NameLoad Num body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str NameLoad orelse Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr Str body If NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Str body Return Str orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str For NameStore SubscriptLoad NameLoad Slice Num body If CompareEq NameLoad Str body AugAssignAdd NameStore Str orelse AugAssignAdd NameStore Str Assign NameStore BinOpMod Str TupleLoad Call NameLoad SubscriptLoad NameLoad Slice Num Num Num Call NameLoad SubscriptLoad NameLoad Slice Num Num Num Call NameLoad SubscriptLoad NameLoad Slice Num Num Num Return Call NameLoad NameLoad Num decorator_list decorator_list
N/A N/A os N/A subprocess N/A select N/A re N/A datetime MiniCluster N/A object N/A N/A  Class that spawns a hadoop mini cluster and wrap hadoop functionality

    This class requires the ``HADOOP_HOME`` environment variable to be set to run the ``hadoop`` command.
    It will search ``HADOOP_HOME`` for ``hadoop-mapreduce-client-jobclient<version>-tests.jar``, but the
    location of this jar can also be supplied by the ``HADOOP_JOBCLIENT_JAR`` environment variable.

    Since the current minicluster interface doesn't provide for specifying the namenode post number, and
    chooses a random one, this class parses the output from the minicluster to find the port numer.

    All supplied methods (like :py:func:`put`, :py:func:`ls`, etc) use the hadoop command to perform operations, and not
    the snakebite client, since this is used for testing snakebite itself.

    All methods return a list of maps that are snakebite compatible.

    Example without :mod:`snakebite.client <client>`

    >>> from snakebite.minicluster import MiniCluster
    >>> cluster = MiniCluster("/path/to/test/files")
    >>> ls_output = cluster.ls(["/"])

    Example with :mod:`snakebite.client <client>`

    >>> from snakebite.minicluster import MiniCluster
    >>> from snakebite.client import Client
    >>> cluster = MiniCluster("/path/to/test/files")
    >>> client = Client('localhost', cluster.port)
    >>> ls_output = client.ls(["/"])

    Just as the snakebite client, the cluster methods take a list of strings as paths. Wherever a method
    takes ``extra_args``, normal hadoop command arguments can be given (like -r, -f, etc).

    More info can be found at http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CLIMiniCluster.html

    .. note:: A minicluster will be started at instantiation
    .. note:: Not all hadoop commands have been implemented, only the ones that
              were necessary for testing the snakebite client, but please feel free to add them
     __init__ N/A N/A self testfiles_path start_cluster nnport N/A True None N/A N/A 
        :param testfiles_path: Local path where test files can be found. Mainly used for ``put()``
        :type testfiles_path: string
        :param start_cluster: start a MiniCluster on initialization. If False, this class will act as an interface to the ``hadoop fs`` command
        :type start_cluster: boolean
         N/A N/A self _testfiles_path testfiles_path N/A N/A self _hadoop_home N/A N/A os environ N/A HADOOP_HOME N/A N/A self _jobclient_jar N/A N/A N/A os environ get HADOOP_JOBCLIENT_JAR N/A N/A self _hadoop_cmd N/A %s/bin/hadoop N/A self _hadoop_home N/A start_cluster N/A N/A N/A N/A self _start_mini_cluster nnport N/A N/A self host localhost N/A N/A self port N/A N/A self _get_namenode_port N/A N/A self hdfs_url N/A hdfs://%s:%d N/A N/A self host N/A self port N/A N/A N/A self hdfs_url hdfs:// N/A terminate N/A N/A self N/A N/A N/A  Terminate the cluster

        Since the minicluster is started as a subprocess, this method has to be called explicitely when
        your program ends.
         N/A N/A N/A N/A self hdfs terminate N/A put N/A N/A self src dst N/A N/A N/A Upload a file to HDFS

        This will take a file from the ``testfiles_path`` supplied in the constuctor.
         N/A src N/A %s%s N/A N/A self _testfiles_path src N/A N/A N/A self _getStdOutCmd N/A N/A self _hadoop_cmd fs -put src N/A N/A self _full_hdfs_path dst True N/A put_subprocess N/A N/A self src dst block_size text N/A 134217728 True N/A N/A block_size_flag N/A -Ddfs.block.size=%s N/A str block_size N/A cmd N/A N/A self _hadoop_cmd fs block_size_flag -put src N/A N/A self _full_hdfs_path dst N/A N/A N/A subprocess Popen cmd bufsize 0 stdout N/A subprocess PIPE stderr N/A subprocess PIPE stdin N/A subprocess PIPE universal_newlines text N/A exists N/A N/A self path N/A N/A N/A Return True if <src> exists, False if doesn't N/A N/A N/A N/A self _getReturnCodeCmd N/A N/A self _hadoop_cmd fs -test -e path 0 N/A is_directory N/A N/A self path N/A N/A N/A Return True if <path> is a directory, False if it's NOT a directory N/A N/A N/A N/A self _getReturnCodeCmd N/A N/A self _hadoop_cmd fs -test -d N/A N/A self _full_hdfs_path path 0 N/A is_files N/A N/A self path N/A N/A N/A Return True if <path> is a file, False if it's NOT a file N/A N/A N/A N/A self _getReturnCodeCmd N/A N/A self _hadoop_cmd fs -test -f N/A N/A self _full_hdfs_path path 0 N/A is_greater_then_zero_bytes N/A N/A self path N/A N/A N/A Return True if file <path> is greater than zero bytes in size, False otherwise N/A N/A N/A N/A self _getReturnCodeCmd N/A N/A self _hadoop_cmd fs -test -s N/A N/A self _full_hdfs_path path 0 N/A is_zero_bytes_file N/A N/A self path N/A N/A N/A Return True if file <path> is zero bytes in size, else return False N/A N/A N/A N/A self _getReturnCodeCmd N/A N/A self _hadoop_cmd fs -test -z N/A N/A self _full_hdfs_path path 0 N/A ls N/A N/A self src extra_args N/A N/A N/A N/A List files in a directory N/A src N/A N/A N/A self _full_hdfs_path x N/A x src N/A output N/A N/A self _getStdOutCmd N/A N/A N/A N/A self _hadoop_cmd fs -ls extra_args src True N/A N/A N/A self _transform_ls_output output N/A self hdfs_url N/A mkdir N/A N/A self src extra_args N/A N/A N/A N/A Create a directory N/A N/A N/A self _getStdOutCmd N/A N/A N/A N/A self _hadoop_cmd fs -mkdir extra_args N/A N/A N/A self _full_hdfs_path src True N/A df N/A N/A self src N/A N/A N/A Perform ``df`` on a path N/A N/A N/A self _getStdOutCmd N/A N/A self _hadoop_cmd fs -df N/A N/A self _full_hdfs_path src True N/A du N/A N/A self src extra_args N/A N/A N/A N/A Perform ``du`` on a path N/A src N/A N/A N/A self _full_hdfs_path x N/A x src N/A N/A N/A self _transform_du_output N/A N/A self _getStdOutCmd N/A N/A N/A N/A self _hadoop_cmd fs -du extra_args src True N/A self hdfs_url N/A count N/A N/A self src N/A N/A N/A Perform ``count`` on a path N/A src N/A N/A N/A self _full_hdfs_path x N/A x src N/A N/A N/A self _transform_count_output N/A N/A self _getStdOutCmd N/A N/A N/A self _hadoop_cmd fs -count src True N/A self hdfs_url N/A cat N/A N/A self src extra_args text N/A N/A False N/A N/A N/A N/A self _getStdOutCmd N/A N/A N/A N/A self _hadoop_cmd fs -cat extra_args N/A N/A N/A self _full_hdfs_path src text N/A copyToLocal N/A N/A self src dst extra_args N/A N/A N/A N/A N/A N/A self _getStdOutCmd N/A N/A N/A N/A self _hadoop_cmd fs -copyToLocal extra_args N/A N/A N/A self _full_hdfs_path src dst True N/A getmerge N/A N/A self src dst extra_args N/A N/A N/A N/A N/A N/A self _getStdOutCmd N/A N/A N/A N/A self _hadoop_cmd fs -getmerge extra_args N/A N/A N/A self _full_hdfs_path src dst True N/A tail N/A N/A self src extra_args text N/A N/A False N/A N/A N/A N/A self _getStdOutCmd N/A N/A N/A N/A self _hadoop_cmd fs -tail extra_args N/A N/A N/A self _full_hdfs_path src text N/A text N/A N/A self src N/A N/A N/A N/A N/A self _getStdOutCmd N/A N/A self _hadoop_cmd fs -text N/A N/A self _full_hdfs_path src True N/A _getReturnCodeCmd N/A N/A self cmd N/A N/A N/A proc N/A N/A self _getCmdProcess cmd True N/A N/A N/A proc communicate N/A N/A N/A proc wait N/A _getCmdProcess N/A N/A self cmd text N/A False N/A N/A N/A N/A subprocess Popen cmd stdout N/A subprocess PIPE stderr N/A subprocess PIPE universal_newlines text N/A _getStdOutCmd N/A N/A self cmd text N/A False N/A N/A N/A N/A N/A N/A N/A self _getCmdProcess cmd text communicate N/A 0 N/A _full_hdfs_path N/A N/A self src N/A N/A N/A N/A %s%s N/A N/A self hdfs_url src N/A _find_mini_cluster_jar N/A N/A self path N/A N/A N/A N/A dirpath dirnames filenames N/A N/A os walk path N/A N/A files filenames N/A N/A N/A N/A re match .*hadoop-mapreduce-client-jobclient.+-tests.jar files N/A N/A N/A N/A N/A os path join dirpath files N/A _start_mini_cluster N/A N/A self nnport N/A None N/A N/A N/A self _jobclient_jar N/A N/A hadoop_jar N/A self _jobclient_jar N/A N/A hadoop_jar N/A N/A self _find_mini_cluster_jar N/A self _hadoop_home N/A N/A hadoop_jar N/A N/A N/A Exception No hadoop jobclient test jar found N/A cmd N/A N/A self _hadoop_cmd jar hadoop_jar minicluster -nomr -format N/A nnport N/A N/A N/A N/A cmd extend N/A -nnport N/A %s nnport N/A N/A self hdfs N/A N/A subprocess Popen cmd bufsize 0 stdout N/A subprocess PIPE stderr N/A subprocess PIPE universal_newlines True N/A _get_namenode_port N/A N/A self N/A N/A N/A N/A N/A N/A N/A self hdfs poll None N/A N/A N/A rlist wlist xlist N/A N/A select select N/A N/A N/A self hdfs stderr N/A N/A self hdfs stdout N/A N/A N/A f rlist N/A N/A line N/A N/A f readline N/A N/A line N/A m N/A N/A re match .*Started MiniDFSCluster -- namenode on port (\d+).* line N/A m N/A N/A N/A int N/A N/A m group 1 N/A _transform_ls_output N/A N/A self i base_path N/A N/A N/A result N/A N/A line N/A N/A i split N/A N/A N/A N/A line N/A N/A line startswith Found N/A N/A N/A N/A perms replication owner group length date time path N/A N/A re split \s+ line N/A node N/A N/A N/A replication - N/A N/A replication 0 N/A N/A node N/A permission N/A N/A self _perms_to_int perms N/A N/A node N/A block_replication N/A int replication N/A N/A node N/A owner owner N/A N/A node N/A group group N/A N/A node N/A length N/A int length N/A dt N/A %s %s N/A date time N/A N/A node N/A modification_time N/A long N/A N/A N/A N/A N/A datetime datetime strptime dt %Y-%m-%d %H:%M strftime %s N/A N/A node N/A path N/A N/A path replace base_path N/A N/A node N/A file_type N/A N/A self _get_file_type N/A perms N/A 0 N/A N/A N/A result append node N/A result N/A _transform_du_output N/A N/A self i base_path N/A N/A N/A result N/A N/A line N/A N/A i split N/A N/A line N/A N/A fields N/A N/A re split \s+ line N/A N/A N/A len fields 3 N/A N/A N/A length space_consumed path N/A N/A re split \s+ line N/A N/A N/A N/A len fields 2 N/A N/A N/A length path N/A N/A re split \s+ line N/A N/A N/A ValueError N/A Result of du operation should contain 2 or 3 field, but there's %d fields N/A len fields N/A N/A N/A result append N/A path length N/A N/A path replace base_path N/A long length N/A result N/A _transform_count_output N/A N/A self i base_path N/A N/A N/A result N/A N/A line N/A N/A i split N/A N/A line N/A N/A N/A _ dir_count file_count length path N/A N/A re split \s+ line N/A N/A N/A result append N/A path length directoryCount fileCount N/A N/A path replace base_path N/A long length N/A long dir_count N/A long file_count N/A result N/A _get_file_type N/A N/A self i N/A N/A N/A N/A i - N/A N/A f N/A N/A i N/A _perms_to_int N/A N/A self perms N/A N/A N/A s N/A x N/A perms N/A 1 N/A N/A N/A x - N/A N/A s 0 N/A N/A s 1 N/A octal N/A %d%d%d N/A N/A int N/A s N/A 0 3 2 N/A int N/A s N/A 3 6 2 N/A int N/A s N/A 6 9 2 N/A N/A int octal 8 N/A N/A