com.groupbyinc.flux.action.admin.indices.shrink.TransportShrinkAction.class Maven / Gradle / Ivy
???? 4? Ecom/groupbyinc/flux/action/admin/indices/shrink/TransportShrinkAction ?Lcom/groupbyinc/flux/action/support/master/TransportMasterNodeAction; Ccom/groupbyinc/flux/action/support/master/TransportMasterNodeAction TransportShrinkAction.java Gcom/groupbyinc/flux/action/admin/indices/shrink/TransportShrinkAction$1 4com/groupbyinc/flux/common/settings/Settings$Builder ,com/groupbyinc/flux/common/settings/Settings Builder /com/groupbyinc/flux/threadpool/ThreadPool$Names )com/groupbyinc/flux/threadpool/ThreadPool Names %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup createIndexService ALcom/groupbyinc/flux/cluster/metadata/MetaDataCreateIndexService; client #Lcom/groupbyinc/flux/client/Client; ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/transport/TransportService;Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/cluster/metadata/MetaDataCreateIndexService;Lcom/groupbyinc/flux/action/support/ActionFilters;Lcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver;Lcom/groupbyinc/flux/client/Client;)V *Lcom/groupbyinc/flux/common/inject/Inject; indices:admin/shrink "java/lang/invoke/LambdaMetafactory ! metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; # $
" % & ()Ljava/lang/Object; ( =com/groupbyinc/flux/action/admin/indices/shrink/ShrinkRequest * ()V ,
+ - . A()Lcom/groupbyinc/flux/action/admin/indices/shrink/ShrinkRequest; 0 get ()Ljava/util/function/Supplier; 2 3 4c(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/lang/String;Lcom/groupbyinc/flux/transport/TransportService;Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/action/support/ActionFilters;Lcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver;Ljava/util/function/Supplier;)V 6
7 9 ; this GLcom/groupbyinc/flux/action/admin/indices/shrink/TransportShrinkAction; settings .Lcom/groupbyinc/flux/common/settings/Settings; transportService 0Lcom/groupbyinc/flux/transport/TransportService; clusterService 4Lcom/groupbyinc/flux/cluster/service/ClusterService;
threadPool +Lcom/groupbyinc/flux/threadpool/ThreadPool;
actionFilters 2Lcom/groupbyinc/flux/action/support/ActionFilters; indexNameExpressionResolver BLcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver; executor ()Ljava/lang/String; same M newResponse B()Lcom/groupbyinc/flux/action/admin/indices/shrink/ShrinkResponse; >com/groupbyinc/flux/action/admin/indices/shrink/ShrinkResponse Q
R -
checkBlock ?(Lcom/groupbyinc/flux/action/admin/indices/shrink/ShrinkRequest;Lcom/groupbyinc/flux/cluster/ClusterState;)Lcom/groupbyinc/flux/cluster/block/ClusterBlockException; (com/groupbyinc/flux/cluster/ClusterState V blocks 3()Lcom/groupbyinc/flux/cluster/block/ClusterBlocks; X Y
W Z 3com/groupbyinc/flux/cluster/block/ClusterBlockLevel \ METADATA_WRITE 5Lcom/groupbyinc/flux/cluster/block/ClusterBlockLevel; ^ _ ] ` getShrinkIndexRequest F()Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest; b c
+ d Bcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest f index h L
g i /com/groupbyinc/flux/cluster/block/ClusterBlocks k indexBlockedException ?(Lcom/groupbyinc/flux/cluster/block/ClusterBlockLevel;Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/block/ClusterBlockException; m n
l o request ?Lcom/groupbyinc/flux/action/admin/indices/shrink/ShrinkRequest; state *Lcom/groupbyinc/flux/cluster/ClusterState; masterOperation ?(Lcom/groupbyinc/flux/action/admin/indices/shrink/ShrinkRequest;Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/action/ActionListener;)V I J w getSourceIndex y L
+ z @com/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver | resolveDateMathExpression &(Ljava/lang/String;)Ljava/lang/String; ~
} ? !com/groupbyinc/flux/client/Client ? admin *()Lcom/groupbyinc/flux/client/AdminClient; ? ? ? ? &com/groupbyinc/flux/client/AdminClient ? indices 1()Lcom/groupbyinc/flux/client/IndicesAdminClient; ? ? ? ? java/lang/String ? -com/groupbyinc/flux/client/IndicesAdminClient ? prepareStats `([Ljava/lang/String;)Lcom/groupbyinc/flux/action/admin/indices/stats/IndicesStatsRequestBuilder; ? ? ? ? Icom/groupbyinc/flux/action/admin/indices/stats/IndicesStatsRequestBuilder ? clear M()Lcom/groupbyinc/flux/action/admin/indices/stats/IndicesStatsRequestBuilder; ? ?
? ? setDocs N(Z)Lcom/groupbyinc/flux/action/admin/indices/stats/IndicesStatsRequestBuilder; ? ?
? ? ?(Lcom/groupbyinc/flux/action/admin/indices/shrink/TransportShrinkAction;Lcom/groupbyinc/flux/action/admin/indices/shrink/ShrinkRequest;Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/lang/String;Lcom/groupbyinc/flux/action/ActionListener;)V ?
? execute .(Lcom/groupbyinc/flux/action/ActionListener;)V ? ?
? ?
shrinkRequest listener mLcom/groupbyinc/flux/action/ActionListener; +Lcom/groupbyinc/flux/action/ActionListener; sourceIndex Ljava/lang/String; prepareCreateIndexRequest#(Lcom/groupbyinc/flux/action/admin/indices/shrink/ShrinkRequest;Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/util/function/IntFunction;Lcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexClusterStateUpdateRequest; metaData 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData; ? ?
W ? -com/groupbyinc/flux/cluster/metadata/MetaData ? H(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; h ?
? ? builder 8()Lcom/groupbyinc/flux/common/settings/Settings$Builder; ? ?
? 0()Lcom/groupbyinc/flux/common/settings/Settings; ? ?
g ? put f(Lcom/groupbyinc/flux/common/settings/Settings;)Lcom/groupbyinc/flux/common/settings/Settings$Builder; ? ?
? index. ? normalizePrefix J(Ljava/lang/String;)Lcom/groupbyinc/flux/common/settings/Settings$Builder; ? ?
? build ? ?
? 2com/groupbyinc/flux/cluster/metadata/IndexMetaData ? INDEX_NUMBER_OF_SHARDS_SETTING -Lcom/groupbyinc/flux/common/settings/Setting; ? ? ? ? +com/groupbyinc/flux/common/settings/Setting ? exists 1(Lcom/groupbyinc/flux/common/settings/Settings;)Z ? ?
? ? B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object; 2 ?
? ? java/lang/Integer ? intValue ()I ? ?
? ? java/util/function/IntFunction ? selectShrinkShards G(ILcom/groupbyinc/flux/cluster/metadata/IndexMetaData;I)Ljava/util/Set; ? ?
? ?
java/util/Set ? iterator ()Ljava/util/Iterator; ? ? ? ? java/util/Iterator ? hasNext ()Z ? ? ? ? next ? ( ? ? 'com/groupbyinc/flux/index/shard/ShardId ? id ? ?
? ? apply (I)Ljava/lang/Object; ? ? ? ? )com/groupbyinc/flux/index/shard/DocsStats ? getCount ()J
?? java/lang/IllegalStateException java/lang/StringBuilder
- RCan't merge index with more than [2147483519] docs - too many documents in shards append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
-(Ljava/lang/Object;)Ljava/lang/StringBuilder;
toString L
(Ljava/lang/String;)V
$INDEX_ROUTING_PARTITION_SIZE_SETTING ? ? "java/lang/IllegalArgumentException Ecannot provide a routing partition size value when shrinking an index
shrink_index# cause X(Ljava/lang/String;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest;%&
g' index.number_of_shards) K(Ljava/lang/String;I)Lcom/groupbyinc/flux/common/settings/Settings$Builder; ?+
, |(Lcom/groupbyinc/flux/common/settings/Settings$Builder;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest; ?.
g/ Tcom/groupbyinc/flux/action/admin/indices/create/CreateIndexClusterStateUpdateRequest1 j(Lcom/groupbyinc/flux/transport/TransportMessage;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V 3
24 timeout -()Lcom/groupbyinc/flux/common/unit/TimeValue;67
g8
ackTimeout h(Lcom/groupbyinc/flux/common/unit/TimeValue;)Lcom/groupbyinc/flux/cluster/ack/ClusterStateUpdateRequest;:;
2< masterNodeTimeout>7
g?>;
2A ?(Lcom/groupbyinc/flux/common/settings/Settings;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexClusterStateUpdateRequest; ?C
2D aliases ()Ljava/util/Set;FG
gH g(Ljava/util/Set;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexClusterStateUpdateRequest;FJ
2K customs ()Ljava/util/Map;MN
gO g(Ljava/util/Map;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexClusterStateUpdateRequest;MQ
2R waitForActiveShards 7()Lcom/groupbyinc/flux/action/support/ActiveShardCount;TU
gV ?(Lcom/groupbyinc/flux/action/support/ActiveShardCount;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexClusterStateUpdateRequest;TX
2Y getIndex #()Lcom/groupbyinc/flux/index/Index;[\
?]
shrinkFrom y(Lcom/groupbyinc/flux/index/Index;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexClusterStateUpdateRequest;_`
2a docsStats +Lcom/groupbyinc/flux/index/shard/DocsStats; )Lcom/groupbyinc/flux/index/shard/ShardId; shardIds :Ljava/util/Set; Ljava/util/Set; count J i I perShardDocStats MLjava/util/function/IntFunction; Ljava/util/function/IntFunction; targetIndex DLcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest; targetIndexName 4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; targetIndexSettings numShards settingsBuilder 6Lcom/groupbyinc/flux/common/settings/Settings$Builder; ?(Lcom/groupbyinc/flux/action/support/master/MasterNodeRequest;Lcom/groupbyinc/flux/cluster/ClusterState;)Lcom/groupbyinc/flux/cluster/block/ClusterBlockException; T U
y ?(Lcom/groupbyinc/flux/action/support/master/MasterNodeRequest;Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/action/ActionListener;)V java/lang/Exception| u v
~ -()Lcom/groupbyinc/flux/action/ActionResponse; O P
?
access$000 ?(Lcom/groupbyinc/flux/action/admin/indices/shrink/TransportShrinkAction;)Lcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver; x0
access$100 ?(Lcom/groupbyinc/flux/action/admin/indices/shrink/TransportShrinkAction;)Lcom/groupbyinc/flux/cluster/metadata/MetaDataCreateIndexService; Code LocalVariableTable LineNumberTable RuntimeVisibleAnnotations LocalVariableTypeTable Signature ?(Lcom/groupbyinc/flux/action/admin/indices/shrink/ShrinkRequest;Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/action/ActionListener;)V
StackMapTableP(Lcom/groupbyinc/flux/action/admin/indices/shrink/ShrinkRequest;Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/util/function/IntFunction;Lcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexClusterStateUpdateRequest;
Exceptions BootstrapMethods
SourceFile InnerClasses ! ? ? !*+ ,-? 5 ? 8*? :*?