403Webshell
Server IP : 35.236.43.222  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User : deploy ( 1002)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/google-cloud-sdk/lib/surface/dataproc/clusters/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/google-cloud-sdk/lib/surface/dataproc/clusters/__pycache__/update.cpython-311.pyc
�

��L9����dZddlmZddlmZddlmZddlmZddlmZddlm	Z	ddl
mZdd	l
mZdd
l
m
Z
ddlmZddlmZdd
lmZddlmZddlZGd�de
j��Zd�Zd�ZdS)zUpdate cluster command.�)�absolute_import)�division)�unicode_literals)�dataproc)�
exceptions)�util)�actions)�arg_parsers)�base)�flags)�labels_util)�log)�timesNc�.�eZdZdZed���Zd�ZdS)�UpdateaUpdate labels and/or the number of worker nodes in a cluster.

  Update the number of worker nodes and/or the labels in a cluster.

  ## EXAMPLES

  To resize a cluster, run:

    $ {command} my-cluster --region=us-central1 --num-workers=5

  To change the number preemptible workers in a cluster, run:

    $ {command} my-cluster --region=us-central1 --num-preemptible-workers=5

  To add the label 'customer=acme' to a cluster, run:

    $ {command} my-cluster --region=us-central1 --update-labels=customer=acme

  To update the label 'customer=ackme' to 'customer=acme', run:

    $ {command} my-cluster --region=us-central1 --update-labels=customer=acme

  To remove the label whose key is 'customer', run:

    $ {command} my-cluster --region=us-central1 --remove-labels=customer

  c��tj|�����}tj�|��t
j|��tj	|d���tj
|d|j��|�dtd���|�d���}|�d	tjd	d
���tdd�
��|�dtd���|�dt#jdd���d���|�ddt&���t)||�����|���}|�dt#j��d���|�ddd���|���}|�dt#j��d���|�d t"jjd!���|�d"dd#���|���}tj|d$�%��|�d&dd'���dS)(N�25h)�default�updatez
--num-workersz.The new number of worker nodes in the cluster.��type�helpT)�mutexz--num-preemptible-workerszcThe `--num-preemptible-workers` flag is deprecated. Use the `--num-secondary-workers` flag instead.)�warnz:The new number of preemptible worker nodes in the cluster.)�actionr�hiddenrz--num-secondary-workersz8The new number of secondary worker nodes in the cluster.z--graceful-decommission-timeout�0s�1d)�lower_bound�upper_bounda�
              The graceful decommission timeout for decommissioning Node Managers
              in the cluster, used when removing nodes. Graceful decommissioning
              allows removing nodes from the cluster without interrupting jobs in
              progress. Timeout specifies how long to wait for jobs in progress to
              finish before forcefully removing nodes (and potentially
              interrupting jobs). Timeout defaults to 0 if not set (for forceful
              decommission), and the maximum allowed timeout is 1 day.
              See $ gcloud topic datetimes for information on duration formats.
              z--min-secondary-worker-fractionaMinimum fraction of new secondary worker nodes added in a scale up update operation, required to update the cluster. If it is not met, cluster updation will rollback the addition of secondary workers. Must be a decimal value between 0 and 1. Defaults to 0.0001.)rrz
--max-idlez�        The duration before cluster is auto-deleted after last job finished,
        such as "2h" or "1d".
        See $ gcloud topic datetimes for information on duration formats.
        z
--no-max-idle�
store_truezt        Cancels the cluster auto-deletion by cluster idle duration (configured
         by --max-idle flag)
        )rrz	--max-agez�        The lifespan of the cluster before it is auto-deleted, such as
        "2h" or "1d".
        See $ gcloud topic datetimes for information on duration formats.
        z--expiration-timez�        The time when cluster will be auto-deleted, such as
        "2017-08-29T18:52:51.142Z". See $ gcloud topic datetimes for
        information on time formats.
        z--no-max-agez�        Cancels the cluster auto-deletion by maximum cluster age (configured by
         --max-age or --expiration-time flags)
        �v1)�api_versionz--disable-autoscalingz�        Disable autoscaling, if it is enabled. This is an alias for passing the
        empty string to --autoscaling-policy'.
        )�dp�Dataproc�ReleaseTrackr�
ASYNC_FLAG�AddToParserr
�AddUpdateLabelsFlagsr�AddTimeoutFlag�AddClusterResourceArgr#�add_argument�int�add_argument_groupr	�DeprecationActionr
�Duration�float�_AddAlphaArguments�add_mutually_exclusive_group�Datetime�Parse�)AddAutoscalingPolicyResourceArgForCluster)�cls�parserr�num_secondary_workers�idle_delete_group�auto_delete_group�autoscaling_groups       �'lib/surface/dataproc/clusters/update.py�ArgszUpdate.Args@s"���{�3�+�+�-�-�.�.�H��O����'�'�'��$�V�,�,�,�
����/�/�/�/�	����(�2F�G�G�G�
����
�
=��?�?�?�#�5�5�D�5�A�A���&�&�#��(�'�D�F�F�F���
I�'�K�K�K��&�&�!�
�
G�'�I�I�I�
���)�
�
!�d��
E�
E�
E�	��
�
�
����)�
���
�
�
��v�s�/�/�1�1�2�2�2��;�;�=�=���"�"��
�
!�
#�
#��#�
�
�
��"�"����#�
�
�
��;�;�=�=���"�"��
�
!�
#�
#��#�
�
�
��"�"��
�
!�
'��#�
�
�
��"�"����#�
�
�
��;�;�=�=��	�3��t�-�-�-�-��"�"����#�
�
�
�
�
�c	�����tj|������|jj�����j���}g}d}|j�>�j�	|j���}||_
|�d��d}t|j
|j��}|�9�j�	|���}||_|�d��d}|j��|j�:�j�	�j�|j������}n:�j�	|�j�|j������}||_|�d	��d}|���t$jjkr�|j��|j�S�j�	�j��j�|j�
��������}n^�j�	||jj�j��j�|j�
������
��}||_|�d��d}|jrf�j�|jj���������|_|�d��d}n)|jdks|jr|�d��d}�j���}d}|j�8t?j |j��dz|_!|�d��d}|j"�5tGj$|j"��|_%|�d��d}|j&�8t?j |j&��dz|_'|�d��d}|j(rd|_!|�d��d}|j)rd|_'|�d��d}|r	||_*d}��fd���fd�}	tWj,|�jj-j.|	���}
|
j/rd}|�d��|
�0��}|stcj2d����j�-|�j3|�j4���}�j�5�j3�j6�j4|d�7|��tqj9�����}
|j:�!t?j |j:��dz|
_;�j<j=�>|
��}|j?r:t�jA�Bd�C�|jD����dStqjE�|d|jF� ���j�G�j4�j6�j3�!��}
�j<j=�H|
��}t�jI���|S)"NF)�numInstancesz"config.worker_config.num_instancesTz,config.secondary_worker_config.num_instances)�requiredRegistrationFraction)�
startupConfig)rArCzLconfig.secondary_worker_config.startup_config.required_registration_fraction)�standardCapacityBase)�provisioningModelMix)�instanceFlexibilityPolicy)rArCrFzhconfig.secondary_worker_config.instance_flexibility_policy.provisioning_model_mix.standard_capacity_base)�	policyUriz$config.autoscaling_config.policy_uri��sz'config.lifecycle_config.auto_delete_ttlz(config.lifecycle_config.auto_delete_timez'config.lifecycle_config.idle_delete_ttlc����j��j�j�j���}�jj�|��}|S)N��	projectId�region�clusterName)�messages�)DataprocProjectsRegionsClustersGetRequestrLrMrN�client�projects_regions_clusters�Get)�get_cluster_request�current_cluster�cluster_refrs  ��r=�_GetCurrentClusterz&Update.Run.<locals>._GetCurrentCluster s]����
�
E�
E�#�-� �'�%�1�F�3�3��
!��A�E�E�
���o�
�r?c�&�����}|jS�N)�labels)rUrWs �r=�_GetCurrentLabelsz%Update.Run.<locals>._GetCurrentLabels,s���+�*�,�,�o�
�
#�#r?)�orig_labels_thunkrZz6Must specify at least one cluster parameter to update.)�configrNrZrL�,)rNrMrL�cluster�
updateMask�	requestIdz$Updating [{0}] with operation [{1}].z$Waiting for cluster update operation)�message�	timeout_srK)Jr$r%r&�CONCEPTSr_r5rO�
ClusterConfig�num_workers�InstanceGroupConfig�workerConfig�append�
_FirstNonNone�num_preemptible_workersr9�secondaryWorkerConfig�min_secondary_worker_fraction�
StartupConfigr�ALPHA�'secondary_worker_standard_capacity_base�InstanceFlexibilityPolicy�ProvisioningModelMixrC�autoscaling_policy�AutoscalingConfig�RelativeName�autoscalingConfig�disable_autoscaling�LifecycleConfig�max_age�six�	text_type�
autoDeleteTtl�expiration_timer�FormatDateTime�autoDeleteTime�max_idle�
idleDeleteTtl�
no_max_age�no_max_idle�lifecycleConfigr
�ProcessUpdateArgsLazy�Cluster�LabelsValue�needs_update�	GetOrNoner�
ArgumentErrorrNrL�+DataprocProjectsRegionsClustersPatchRequestrM�joinr�GetUniqueId�graceful_decommission_timeout�gracefulDecommissionTimeoutrQrR�Patch�async_r�status�write�format�name�WaitForOperation�timeoutrPrS�UpdatedResource)�self�args�cluster_config�changed_fields�has_changes�
worker_configr9�lifecycle_config�changed_configr[�
labels_updaterZr_�request�	operationrWrVrs               @@@r=�Runz
Update.Run�s������{�4�,�,�.�.�/�/�H��-�'�-�-�/�/�K��&�4�4�6�6�N��N��K���#��'�;�;��'�<�)�)�m�$1�n�!����@�A�A�A��k�)�$�*F�*.�*D�F�F���(��'�;�;�,�<�.�.�m�-:�n�*����
8�:�:�:��k��)�5�	�	-�	5� �)�=�=�"�+�9�9��6�:���>�
�
�
�
�!�)�=�=�.�"�+�9�9��6�:���>�
�
�
�.;�n�*����
X�����k������d�/�5�5�5�	
�	5�	A��/�7�"�+�?�?�(0�(9�(S�(S�'/�'8�'M�'M�+/�+W�(N�(�(�)T�)�)�@���-�-�#�+�?�?�0�*�@�N�(0�(9�(S�(S�'/�'8�'M�'M�+/�+W�(N�(�(�)T�)�)�@���-�0=��,����v�	
�	
�	
�����	�)1�):�)L�)L��M�4�:�:�<�<�I�I�K�K�*M�*M�*M�n�&����B�C�C�C��k�k�	
�	 �B�	&�	&�$�*B�	&����B�C�C�C��k��(�8�8�:�:���N��|��'*�}�T�\�'B�'B�S�'H��$����E�F�F�F��n���'�(-�(<�
�
�) �) ��%����F�G�G�G��n��}� �'*�}�T�]�'C�'C�c�'I��$����E�F�F�F��n����'+��$����E�F�F�F��n����'+��$����E�F�F�F��n���'7�n�$��k�	�	�	�	�	�	�$�$�$�$�$� �5��h��'�3�+�-�-�-�M��!�&��k����H�%�%�%�
�
$�
$�
&�
&�F��D��$�
B�
D�
D�D���'�'���+���'�	(�)�)�G���K�K��+��!��'���8�8�N�+�+��"�$�$�
L�&�&�G��)�5�

�-��:�
;�
;�c�
A��)���9�?�?��H�H�I��{�
�	�j���
0�
7�
7��9�>�+�+�,�,�,�
�f�����6��,�	 � � � ���I�I��'��!��+�J�-�-�G��o�7�;�;�G�D�D�G����$�$�$��Nr?N)�__name__�
__module__�__qualname__�__doc__�classmethodr>r��r?r=rr#sQ��������8�m
�m
��;�m
�^t�t�t�t�tr?rc��|�|n|SrYr�)�first�seconds  r=rjrjgs���#����/r?c�n�|tjjkr|�dtd���dSdS)Nz)--secondary-worker-standard-capacity-basezf
              The number of standard VMs in the Spot and Standard Mix
        feature.
              r)rr&ror,r-)r8�
release_tracks  r=r2r2ksM���d�'�-�-�-�
���3�
��������.�-r?)r��
__future__rrr�googlecloudsdk.api_lib.dataprocrr$rr�googlecloudsdk.callioper	r
r�#googlecloudsdk.command_lib.dataprocr�$googlecloudsdk.command_lib.util.argsr
�googlecloudsdk.corer�googlecloudsdk.core.utilrrz�
UpdateCommandrrjr2r�r?r=�<module>r�s^�� ��&�&�&�&�&�&�������'�'�'�'�'�'�:�:�:�:�:�:�6�6�6�6�6�6�0�0�0�0�0�0�+�+�+�+�+�+�/�/�/�/�/�/�(�(�(�(�(�(�5�5�5�5�5�5�<�<�<�<�<�<�#�#�#�#�#�#�*�*�*�*�*�*�
�
�
�
�A�A�A�A�A�T�
�A�A�A�H
0�0�0�����r?

Youez - 2016 - github.com/yon3zu
LinuXploit