com.groupbyinc.flux.rest.action.cat.RestTable.class Maven / Gradle / Ivy
???? 4? -com/groupbyinc/flux/rest/action/cat/RestTable java/lang/Object RestTable.java @com/groupbyinc/flux/rest/action/cat/RestTable$ColumnOrderElement ColumnOrderElement Bcom/groupbyinc/flux/rest/action/cat/RestTable$TableIndexComparator TableIndexComparator ;com/groupbyinc/flux/rest/action/cat/RestTable$DisplayHeader
DisplayHeader %com/groupbyinc/flux/common/Table$Cell com/groupbyinc/flux/common/Table Cell ()V
this /Lcom/groupbyinc/flux/rest/action/cat/RestTable;
buildResponse q(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestChannel;)Lcom/groupbyinc/flux/rest/RestResponse; java/lang/Exception $com/groupbyinc/flux/rest/RestChannel request (()Lcom/groupbyinc/flux/rest/RestRequest; ! " format $ Accept & $com/groupbyinc/flux/rest/RestRequest ( header &(Ljava/lang/String;)Ljava/lang/String; * +
) , param 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; . /
) 0 0com/groupbyinc/flux/common/xcontent/XContentType 2 fromMediaTypeOrFormat F(Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentType; 4 5
3 6 buildXContentBuilder 8
9 buildTextPlainResponse ;
< table "Lcom/groupbyinc/flux/common/Table; channel &Lcom/groupbyinc/flux/rest/RestChannel; &Lcom/groupbyinc/flux/rest/RestRequest; xContentType 2Lcom/groupbyinc/flux/common/xcontent/XContentType;
newBuilder 7()Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; E F G buildDisplayHeaders Z(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/List; I J
K 3com/groupbyinc/flux/common/xcontent/XContentBuilder M
startArray O F
N P getRowOrder R J
S java/util/List U iterator ()Ljava/util/Iterator; W X V Y java/util/Iterator [ hasNext ()Z ] ^ \ _ next ()Ljava/lang/Object; a b \ c java/lang/Integer e startObject g F
N h display Ljava/lang/String; j k
l getAsMap ()Ljava/util/Map; n o
p name r k
s
java/util/Map u get &(Ljava/lang/Object;)Ljava/lang/Object; w x v y intValue ()I { |
f } (I)Ljava/lang/Object; w V ? value Ljava/lang/Object; ? ? ? renderValue L(Lcom/groupbyinc/flux/rest/RestRequest;Ljava/lang/Object;)Ljava/lang/String; ? ?
? field [(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
N ? endObject ? F
N ? endArray ? F
N ? *com/groupbyinc/flux/rest/BytesRestResponse ? #com/groupbyinc/flux/rest/RestStatus ? OK %Lcom/groupbyinc/flux/rest/RestStatus; ? ? ? ? ](Lcom/groupbyinc/flux/rest/RestStatus;Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;)V ?
? ? =Lcom/groupbyinc/flux/rest/action/cat/RestTable$DisplayHeader; row Ljava/lang/Integer; builder 5Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; displayHeaders OLjava/util/List; Ljava/util/List; rowOrder %Ljava/util/List; java/io/IOException ? v ? paramAsBoolean (Ljava/lang/String;Z)Z ? ?
) ? buildWidths ](Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;ZLjava/util/List;)[I ? ?
? bytesOutput :()Lcom/groupbyinc/flux/common/io/stream/BytesStreamOutput; ? ? ? %com/groupbyinc/flux/common/io/Streams ? flushOnCloseStream f(Lcom/groupbyinc/flux/common/io/stream/BytesStream;)Lcom/groupbyinc/flux/common/io/stream/BytesStream; ? ?
? ? .com/groupbyinc/flux/common/io/UTF8StreamWriter ?
? setOutput H(Ljava/io/OutputStream;)Lcom/groupbyinc/flux/common/io/UTF8StreamWriter; ? ?
? ? size ? | V ? [I ? 0com/groupbyinc/flux/common/io/stream/BytesStream ? findHeaderByName ;(Ljava/lang/String;)Lcom/groupbyinc/flux/common/Table$Cell; ? ?
? <(Ljava/lang/Object;Lcom/groupbyinc/flux/common/Table$Cell;)V ?
? pad ?(Lcom/groupbyinc/flux/common/Table$Cell;ILcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/common/io/UTF8StreamWriter;Z)V ? ?
? ? append *(Ljava/lang/CharSequence;)Ljava/io/Writer; ? ?
? ?
? close ?
? ? text/plain; charset=UTF-8 ? bytes 3()Lcom/groupbyinc/flux/common/bytes/BytesReference; ? ?
? ? k(Lcom/groupbyinc/flux/rest/RestStatus;Ljava/lang/String;Lcom/groupbyinc/flux/common/bytes/BytesReference;)V ?
? ? isLastColumn Z col I verbose headers width bytesOut 2Lcom/groupbyinc/flux/common/io/stream/BytesStream; out 0Lcom/groupbyinc/flux/common/io/UTF8StreamWriter;
lastHeader s ? paramAsStringArray :(Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String; ? ?
) ? java/util/ArrayList ?
? [Ljava/lang/String; getRows ()Ljava/util/List;
valueOf (I)Ljava/lang/Integer;
f add (Ljava/lang/Object;)Z V
getAliasMap o
:desc java/lang/String endsWith (Ljava/lang/String;)Z
length |
substring (II)Ljava/lang/String;
:asc! containsKey# v$ (Ljava/lang/String;Z)V &
' 'java/lang/UnsupportedOperationException) java/util/Locale+ ROOT Ljava/util/Locale;-. ,/ 'Unable to sort by unknown sort key `%s`1 K(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; $3
4 (Ljava/lang/String;)V 6
*7 5(Lcom/groupbyinc/flux/common/Table;Ljava/util/List;)V 9
: java/util/Collections< sort )(Ljava/util/List;Ljava/util/Comparator;)V>?
=@ i columnHeader reverse headerAliasMap 5Ljava/util/Map; Ljava/util/Map; ordering TLjava/util/List; columnOrdering hK hasParamM
)N expandHeadersFromRequest Y(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/Set;PQ
R
java/util/SetTU Y '(Ljava/lang/String;Ljava/lang/String;)V W
X
getHeadersZ
[ attr]G ^ alias` "com/groupbyinc/flux/common/Stringsb splitStringByCommaToArray '(Ljava/lang/String;)[Ljava/lang/String;de
cf equalsh
i toString ()Ljava/lang/String;kl
m checkOutputTimestamp f(Lcom/groupbyinc/flux/rest/action/cat/RestTable$DisplayHeader;Lcom/groupbyinc/flux/rest/RestRequest;)Zop
q getHeaderMaps o
t siblingv java/lang/StringBuilderx
y -(Ljava/lang/String;)Ljava/lang/StringBuilder; ?{
y| .~
ym default? #com/groupbyinc/flux/common/Booleans? parseBoolean? ?
?? ;(Ljava/lang/String;Lcom/groupbyinc/flux/rest/RestRequest;)Zo?
? aliases
headerCell 'Lcom/groupbyinc/flux/common/Table$Cell; c hcell siblingFlag
dispHeader possibility #Ljava/util/Set; Ljava/util/Set; d cell timestamp? epoch? ts? disp java/util/LinkedHashSet? (I)V ?
?? . +
)? &com/groupbyinc/flux/common/regex/Regex? isSimpleMatchPattern?
?? simpleMatch '(Ljava/lang/String;Ljava/lang/String;)Z??
??U
configuredHeader tableHeaderCell buildHelpWidths L(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)[I ? desc?
not available? vWidth hdr ?(Lcom/groupbyinc/flux/common/Table$Cell;ILcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/common/io/UTF8StreamWriter;)V
text-align? left? right? B isLast sValue leftOver textAlign -com/groupbyinc/flux/common/unit/ByteSizeValue? ? b? getBytes ()J??
?? java/lang/Long? (J)Ljava/lang/String;k?
?? k? kb? getKb??
?? m? mb? getMb??
?? g? gb? getGb??
?? t? tb? getTb??
?? p? pb? getPb??
??
?m )com/groupbyinc/flux/common/unit/SizeValue? ? singles??
?? kilo??
? mega?
? giga?
? tera?
? peta?
?
?m )com/groupbyinc/flux/common/unit/TimeValue time nanos?
micros?
ms millis?
seconds ?
! minutes#?
$ hours&?
'? days*?
+
m /Lcom/groupbyinc/flux/common/unit/ByteSizeValue;
resolution +Lcom/groupbyinc/flux/common/unit/SizeValue; +Lcom/groupbyinc/flux/common/unit/TimeValue; Code LocalVariableTable LineNumberTable
StackMapTable
Exceptions LocalVariableTypeTable Signature o(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/List; ?(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/List; m(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/Set; ?(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;ZLjava/util/List;)[I
SourceFile InnerClasses ! 2 / *? ? 3 4 2 2 ? '+? # M,%,'? -? 1? 7N-? *+? :?*+? =? 3 * ' > ? ' @ A B C D 4 5 6 7 8 ! :5 ? ! ) 36 8 2 ?
?+? # M+? H N*,? L:-? QW*,? T:? Z :? ` ? m? d ? f:-? iW? Z :? ` ? A? d ?
: - ? m,*? q ? t? z ? V? ~? ? ? ? ?? ?? ?W???-? ?W???-? ?W? ?Y? ?-? ?? 3 R d / * ? @ [ ? ? ? > ? ? @ A ? B ? ? ? ? ? ? ! ? ? ? 7 ? ? ? ! ? ? ? 4 : > ? @ B C ! D @ E E F d G ? H ? I ? J ? K ? L5 - ? * ) N V V \ ? # f \? G? 6 ; 2 a+? # M,?? ?>*,? L:*,? ?:+? ? ? ?:? ?Y? ?? ?:? ? d6? k6 ? ? ? T ? ? ?
:
? ? 6? Y
? m*
? t? з ? .,? ?? ٶ ?W? ???߶ ?W*,? T: ? Z :
? ` ? ?
? d ? f:6? ? ? ]? ? ?
:
? ? 6*? q
? t? z ? V? ~? ? ? .,? ?? ٶ ?W????߶ ?W??y? ? ?Y? ??? ? ? 3 ? e = * ?
s / ? ? K ] ? ? ? F * ?
8 ? ? ? f ? ? ? q ? ? a > ? a @ A Z B R ? ? K ? ? A ? ? +6 ? ? 9( ? ? D ? ? ? ? ? ? 7 K ? ? ? ? ? ? 4 v P Q S T V + W 9 X D Y H Z W [ e \ s ] ? ^ ? _ ? Z ? b ? e ? g ? h ? i ? j k, l1 m9 h? pG qJ rO s5 Q
? K
) V ? ? ? ? $
@? 0? ? V \? f? $
@? 9? ?
6 ? R J 2 , ?+?? ?M? ?Y? N6*?? ? ? -?
? W????,? ?*?:? ?Y? :6,?? ?,2:6?? ??d? :6? ""?? ?"?d? :?% ? #? Y? z ??(? W? ?*Y?02? YS?5?8????c-?
Y*?;?A-? 3 f
B ? V ?C k Y ?D ? I ?B ? = ?EG F ?H ? ? > ? ? B ?J ? ? ? 7 = ?EF F ?HI ? ? ? 4 ^ w y z ! { - z 3 ~ 7 = ? F ? P ? V ? Y ? d ? x ? ~ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?5 + ? V? ? v V? 4+? ? ?
8 9 I J 2 ? ?? ?Y? M+L?O?~*+?SN-?V :? ` ?c? d ?::*? q?% ? ?
Y?Y:? ?*?\? Z :? ` ? l? d ? :?_a? z ?: ? F ?g:
?66? 0
2:
?j? ?
Y? ??n
?Y:? ???ϧ??? ?+?r? ?,? W*?u? t? z ? :?_w? z ?:? t?yY?z?}?}? t?}??: *?u ? z ? :
? @+? ?? 6,?
Y
? ??n?yY?z?}?}? m?}???Y? W???? l*?\? Z N-? ` ? Y-? d ? :?_?? z ?:??? 0? ??n+??? !,?
Y? ??n? ??n?Y? W???,? 3 ? ? ` k
? H? k x Z?? 5 Rv k E B??
? ??? v? k 9N? ? 6Q? k r ?? ? 6? k ? H?? ? > ? ? B ? j ? 7 r ?? ? j ? 4 ? ! ? ? ? ? 6 ? 9 ? G ? W ? x ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?5 ?E ?T ?? ?? ?? ?? ?? ?? ?? ?? ?5 }
? VU \? 6
?
\? ;
) VU \
\ -? ) VU \
\ ? ? ?? ? \? [? 8 : op 2 = *? t+??? 3 ? ? B 4 ? o? 2 e ?*?j?
?*?j? +?? ??? 3 ? k B 4 ? ? ?5
PQ 2 / ??Y*?\? ? ??M+L???gN-?66? ?-2:??? ?*?\? Z :? ` ? ?? d ? :? ??n: ??? , ?? W? ^?_a?% ? N?_a? z ??g:
:?66
? &
2:??? , ?? W? ?
??٧?o? ,?? W???=,? 3 R ? ` k ? 6?
c q? k Y {?? 0 ? * k ? > ? ? B ? ?? 7 ? ?? 4 J ? ? 0 ? 8 ? Y ? c ? m ? y ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?5 x
? # )U ? \? 5 ? 0 )U \ #? )U \ ? ? ? 8 ; ?? 2 ? ??
M*?\? Z N-? ` ? ?-? d ? :+? ?? ?:? ? ?6,.? ,O+?_a?% ? ?_a? z ? ?? ?:? ? ?6,.? ,O+?_??% ? ?_?? z ? ?? ?:? ? ?6,.? ,O??8,? 3 > - ? ? k = ?? ? " ??? ? > ? ? B ? ? ? 4 B ? ? " ? - ? = ? E J s ? ? ? ?
? ? ? ?5 o ? ? \? ' D? ` )? ) ? \ )
D` )? ) ? \ )
D? ?
? ? 2 ( ?-? ? ?
:? E6-? Z :? ` ? 0? d ?
:? m?6.?
O????6-? Z :? ` ? r? d ?
:*? q? t? z ? V? Z :? ` ? >? d ? : + ? ?? ?:
? ?
?6.?
O???????? 3 ?
9 ? ? / ? ? ?B ? ? ! ? k
? ? ? ? ,?? q `? ? ? > ? ? B ? ? ? ? ? ?
? ? ? S ?B ? 7 ? ? ? 4 R
/ 9 C J M P! S" q# ?$ ?% ?&