com.groupbyinc.flux.rest.action.cat.RestTable.class Maven / Gradle / Ivy
???? 4S -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 DEPRECATION_LOGGER 6Lcom/groupbyinc/flux/common/logging/DeprecationLogger; ()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 1
+ 2 0com/groupbyinc/flux/common/xcontent/XContentType 4 fromMediaTypeOrFormat F(Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentType; 6 7
5 8 buildXContentBuilder :
; 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; G H ! I buildDisplayHeaders Z(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/List; K L
M 3com/groupbyinc/flux/common/xcontent/XContentBuilder O
startArray Q H
P R getRowOrder T L
U java/util/List W iterator ()Ljava/util/Iterator; Y Z X [ java/util/Iterator ] hasNext ()Z _ ` ^ a next ()Ljava/lang/Object; c d ^ e java/lang/Integer g startObject i H
P j display Ljava/lang/String; l m
n getAsMap ()Ljava/util/Map; p q
r name t m
u
java/util/Map w get &(Ljava/lang/Object;)Ljava/lang/Object; y z x { intValue ()I } ~
h (I)Ljava/lang/Object; y ? X ? 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; ? ?
P ? endObject ? H
P ? endArray ? H
P ? *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/UTF8StreamWriter ?
? setOutput H(Ljava/io/OutputStream;)Lcom/groupbyinc/flux/common/io/UTF8StreamWriter; ? ?
? ? size ? ~ X ? [I ? 6com/groupbyinc/flux/common/io/stream/BytesStreamOutput ? 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 8Lcom/groupbyinc/flux/common/io/stream/BytesStreamOutput; 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;
h add (Ljava/lang/Object;)Z X getAliasMap q
:desc java/lang/String endsWith (Ljava/lang/String;)Z
length ~
substring (II)Ljava/lang/String;
:asc containsKey x (Ljava/lang/String;Z)V "
# 'java/lang/UnsupportedOperationException% java/util/Locale' ROOT Ljava/util/Locale;)* (+ 'Unable to sort by unknown sort key `%s`- K(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; &/
0 (Ljava/lang/String;)V 2
&3 5(Lcom/groupbyinc/flux/common/Table;Ljava/util/List;)V 5
6 java/util/Collections8 sort )(Ljava/util/List;Ljava/util/Comparator;)V:;
9< i columnHeader reverse headerAliasMap 5Ljava/util/Map; Ljava/util/Map; ordering TLjava/util/List; columnOrdering hG hasParamI
+J expandHeadersFromRequest Y(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/Set;LM
N
java/util/SetPQ [ '(Ljava/lang/String;Ljava/lang/String;)V S
T
getHeadersV
W attrYC Z alias\ "com/groupbyinc/flux/common/Strings^ splitStringByCommaToArray '(Ljava/lang/String;)[Ljava/lang/String;`a
_b equalsd
e toString ()Ljava/lang/String;gh
i checkOutputTimestamp f(Lcom/groupbyinc/flux/rest/action/cat/RestTable$DisplayHeader;Lcom/groupbyinc/flux/rest/RestRequest;)Zkl
m getHeaderMapo q
p siblingr java/lang/StringBuildert
u -(Ljava/lang/String;)Ljava/lang/StringBuilder; ?w
ux .z
ui default} #com/groupbyinc/flux/common/Booleans parseBoolean? ?
?? isStrictlyBoolean?
?? ? YExpected a boolean [true/false] for attribute [default] of table header [{}] but got [{}]? 4com/groupbyinc/flux/common/logging/DeprecationLogger?
deprecated ((Ljava/lang/String;[Ljava/lang/Object;)V??
?? ;(Ljava/lang/String;Lcom/groupbyinc/flux/rest/RestRequest;)Zk?
? aliases
headerCell 'Lcom/groupbyinc/flux/common/Table$Cell; c hcell siblingFlag
dispHeader possibility #Ljava/util/Set; Ljava/util/Set; d defaultValue cell timestamp? epoch? ts? disp java/util/LinkedHashSet? (I)V ?
?? 0 -
+? &com/groupbyinc/flux/common/regex/Regex? isSimpleMatchPattern?
?? simpleMatch '(Ljava/lang/String;Ljava/lang/String;)Z??
??Q 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;g?
?? k? kb? getKb??
?? m? mb? getMb??
?? g? gb? getGb??
?? t? tb? getTb??
?? p? pb? getPb??
?
?i )com/groupbyinc/flux/common/unit/SizeValue ? singles?
kilo ?
mega?
giga?
tera?
peta?
i )com/groupbyinc/flux/common/unit/TimeValue time nanos?
micros!!?
# ms% millis'?
( seconds*?
+ minutes-?
. hours0?
1? days4?
5
i /Lcom/groupbyinc/flux/common/unit/ByteSizeValue;
resolution +Lcom/groupbyinc/flux/common/unit/SizeValue; +Lcom/groupbyinc/flux/common/unit/TimeValue; *com/groupbyinc/flux/common/logging/Loggers= getLogger K(Ljava/lang/Class;)Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;?@
>A ;(Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;)V C
?D 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 ! F / *? ? G H 3 F ? '+? % M,',)? /? 3? 9N-? *+? *+? ?? G * ' @ A ' B C " D E F H 7 8 9 : ! <I ? ! + 5J : F ?
?+? % M+? J N*,? N:-? SW*,? V:? \ :? b ? m? f ? h:-? kW? \ :? b ? A? f ?
: - ? o,*? s ? v? | ? X? ?? ? ? ? ?? ?? ?W???-? ?W???-? ?W? ?Y? ?-? ?? G R d / , ? @ [ ? ? ? @ A ? B C ? " D ? ? ? ? ? ? ! ? ? ? K ? ? ? ! ? ? ? H : @ A B D E ! F @ G E H d I ? J ? K ? L ? M ? NI - ? * ! + P X X ^ ? # h ^? G? J = F ^+? % M,?? ?>*,? N:*,? ?:+? ? :? ?Y? ?? ?:? ? d6? k6 ? ? ? T ? ? ?
:
? ? 6? Y
? o*
? v? ̷ ? .,? ?? ն ?W? ???۶ ?W*,? V: ? \ :
? b ? ?
? f ? h:6? ? ? ]? ? ?
:
? ? 6*? s
? v? | ? X? ?? ? ? .,? ?? ն ?W????۶ ?W??y? ?Y? ??? ? ? G ? b = , ?
p / ? ? H ] ? ? ? F , ?
? 8 ? ? ? f ? ? ? q ? ? ^ @ A ^ B C W " D O ? ? H ? ? > ? ? (6 ? ? 6( ? ? A ? ? ? ? ? ? K H ? ? ? ? ? ? H v R S U V X ( Y 6 Z A [ E \ T ] b ^ p _ ? ` ? a ? \ ? d ? g ? i ? j ? k ? l ? m) n. o6 j<