github.com/rohankumardubey/aresdb@v0.0.2-0.20190517170215-e54e3ca06b9c/api/ui/swagger/swagger.json (about) 1 { 2 "consumes": [ 3 "application/json" 4 ], 5 "produces": [ 6 "application/json" 7 ], 8 "schemes": [ 9 "http" 10 ], 11 "swagger": "2.0", 12 "info": { 13 "title": "provide the RESTful APIs to interact with AresDB.", 14 "version": "0.0.1" 15 }, 16 "basePath": "/", 17 "paths": { 18 "/data/{table}/{shard}": { 19 "post": { 20 "description": "Post new data batch to a existing table shard", 21 "consumes": [ 22 "application/upsert-data" 23 ], 24 "operationId": "postData", 25 "parameters": [ 26 { 27 "type": "string", 28 "x-go-name": "TableName", 29 "name": "table", 30 "in": "path", 31 "required": true 32 }, 33 { 34 "type": "integer", 35 "format": "int64", 36 "x-go-name": "Shard", 37 "name": "shard", 38 "in": "path", 39 "required": true 40 }, 41 { 42 "name": "Body", 43 "in": "body", 44 "schema": { 45 "type": "array", 46 "items": { 47 "type": "integer", 48 "format": "uint8" 49 } 50 } 51 } 52 ], 53 "responses": { 54 "200": { 55 "$ref": "#/responses/noContentResponse" 56 }, 57 "default": { 58 "$ref": "#/responses/errorResponse" 59 } 60 } 61 } 62 }, 63 "/query/aql": { 64 "post": { 65 "description": "query in AQL", 66 "consumes": [ 67 "application/json", 68 "application/hll" 69 ], 70 "produces": [ 71 "application/json" 72 ], 73 "operationId": "queryAQL", 74 "parameters": [ 75 { 76 "type": "integer", 77 "format": "int64", 78 "x-go-name": "Device", 79 "name": "device", 80 "in": "query" 81 }, 82 { 83 "type": "integer", 84 "format": "int64", 85 "x-go-name": "Verbose", 86 "name": "verbose", 87 "in": "query" 88 }, 89 { 90 "type": "integer", 91 "format": "int64", 92 "x-go-name": "Debug", 93 "name": "debug", 94 "in": "query" 95 }, 96 { 97 "type": "string", 98 "x-go-name": "Profiling", 99 "name": "profiling", 100 "in": "query" 101 }, 102 { 103 "type": "string", 104 "x-go-name": "Query", 105 "name": "q", 106 "in": "query" 107 }, 108 { 109 "type": "integer", 110 "format": "int64", 111 "x-go-name": "DeviceChoosingTimeout", 112 "name": "timeout", 113 "in": "query" 114 }, 115 { 116 "type": "string", 117 "x-go-name": "Accept", 118 "name": "accept", 119 "in": "header" 120 }, 121 { 122 "type": "string", 123 "x-go-name": "Origin", 124 "name": "origin", 125 "in": "header" 126 }, 127 { 128 "name": "Body", 129 "in": "body", 130 "schema": { 131 "$ref": "#/definitions/AQLRequest" 132 } 133 } 134 ], 135 "responses": { 136 "200": { 137 "$ref": "#/responses/aqlResponse" 138 }, 139 "400": { 140 "$ref": "#/responses/aqlResponse" 141 }, 142 "default": { 143 "$ref": "#/responses/errorResponse" 144 } 145 } 146 } 147 }, 148 "/schema/tables": { 149 "get": { 150 "description": "List all table schemas", 151 "consumes": [ 152 "application/json" 153 ], 154 "produces": [ 155 "application/json" 156 ], 157 "operationId": "listTables", 158 "responses": { 159 "200": { 160 "$ref": "#/responses/stringArrayResponse" 161 }, 162 "default": { 163 "$ref": "#/responses/errorResponse" 164 } 165 } 166 }, 167 "post": { 168 "description": "add table to table collections", 169 "consumes": [ 170 "application/json" 171 ], 172 "operationId": "addTable", 173 "parameters": [ 174 { 175 "name": "Body", 176 "in": "body", 177 "schema": { 178 "$ref": "#/definitions/table" 179 } 180 } 181 ], 182 "responses": { 183 "200": { 184 "$ref": "#/responses/noContentResponse" 185 }, 186 "default": { 187 "$ref": "#/responses/errorResponse" 188 } 189 } 190 } 191 }, 192 "/schema/tables/{table}": { 193 "get": { 194 "description": "get the table schema for specific table name", 195 "consumes": [ 196 "application/json" 197 ], 198 "produces": [ 199 "application/json" 200 ], 201 "operationId": "getTable", 202 "parameters": [ 203 { 204 "type": "string", 205 "x-go-name": "TableName", 206 "name": "table", 207 "in": "path", 208 "required": true 209 } 210 ], 211 "responses": { 212 "200": { 213 "$ref": "#/responses/getTableResponse" 214 }, 215 "default": { 216 "$ref": "#/responses/errorResponse" 217 } 218 } 219 }, 220 "put": { 221 "description": "update config of the specified table", 222 "consumes": [ 223 "application/json" 224 ], 225 "operationId": "updateTableConfig", 226 "parameters": [ 227 { 228 "type": "string", 229 "x-go-name": "TableName", 230 "name": "table", 231 "in": "path", 232 "required": true 233 }, 234 { 235 "name": "Body", 236 "in": "body", 237 "schema": { 238 "$ref": "#/definitions/tableConfig" 239 } 240 } 241 ], 242 "responses": { 243 "200": { 244 "$ref": "#/responses/noContentResponse" 245 }, 246 "default": { 247 "$ref": "#/responses/errorResponse" 248 } 249 } 250 }, 251 "delete": { 252 "description": "delete table from metaStore", 253 "operationId": "deleteTable", 254 "parameters": [ 255 { 256 "type": "string", 257 "x-go-name": "TableName", 258 "name": "table", 259 "in": "path", 260 "required": true 261 } 262 ], 263 "responses": { 264 "200": { 265 "$ref": "#/responses/noContentResponse" 266 }, 267 "default": { 268 "$ref": "#/responses/errorResponse" 269 } 270 } 271 } 272 }, 273 "/schema/tables/{table}/columns": { 274 "post": { 275 "description": "add a single column to existing table", 276 "consumes": [ 277 "application/json" 278 ], 279 "operationId": "addColumn", 280 "parameters": [ 281 { 282 "type": "string", 283 "x-go-name": "TableName", 284 "name": "table", 285 "in": "path", 286 "required": true 287 }, 288 { 289 "name": "Body", 290 "in": "body", 291 "schema": { 292 "allOf": [ 293 { 294 "$ref": "#/definitions/column" 295 }, 296 { 297 "type": "object", 298 "properties": { 299 "addToArchivingSortOrder": { 300 "type": "boolean", 301 "x-go-name": "AddToArchivingSortOrder" 302 } 303 } 304 } 305 ] 306 } 307 } 308 ], 309 "responses": { 310 "200": { 311 "$ref": "#/responses/noContentResponse" 312 }, 313 "default": { 314 "$ref": "#/responses/errorResponse" 315 } 316 } 317 } 318 }, 319 "/schema/tables/{table}/columns/{column}": { 320 "put": { 321 "description": "update specified column", 322 "consumes": [ 323 "application/json" 324 ], 325 "operationId": "updateColumn", 326 "parameters": [ 327 { 328 "type": "string", 329 "x-go-name": "TableName", 330 "name": "table", 331 "in": "path", 332 "required": true 333 }, 334 { 335 "type": "string", 336 "x-go-name": "ColumnName", 337 "name": "column", 338 "in": "path", 339 "required": true 340 }, 341 { 342 "name": "Body", 343 "in": "body", 344 "schema": { 345 "$ref": "#/definitions/columnConfig" 346 } 347 } 348 ], 349 "responses": { 350 "200": { 351 "$ref": "#/responses/noContentResponse" 352 }, 353 "default": { 354 "$ref": "#/responses/errorResponse" 355 } 356 } 357 }, 358 "delete": { 359 "description": "delete columns from existing table", 360 "operationId": "deleteColumn", 361 "parameters": [ 362 { 363 "type": "string", 364 "x-go-name": "TableName", 365 "name": "table", 366 "in": "path", 367 "required": true 368 }, 369 { 370 "type": "string", 371 "x-go-name": "ColumnName", 372 "name": "column", 373 "in": "path", 374 "required": true 375 } 376 ], 377 "responses": { 378 "200": { 379 "$ref": "#/responses/noContentResponse" 380 }, 381 "default": { 382 "$ref": "#/responses/errorResponse" 383 } 384 } 385 } 386 }, 387 "/schema/tables/{table}/columns/{column}/enum-cases": { 388 "get": { 389 "description": "list existing enumCases for given table and column", 390 "operationId": "listEnumCases", 391 "parameters": [ 392 { 393 "type": "string", 394 "x-go-name": "TableName", 395 "name": "table", 396 "in": "path", 397 "required": true 398 }, 399 { 400 "type": "string", 401 "x-go-name": "ColumnName", 402 "name": "column", 403 "in": "path", 404 "required": true 405 } 406 ], 407 "responses": { 408 "200": { 409 "$ref": "#/responses/listEnumCasesResponse" 410 }, 411 "default": { 412 "$ref": "#/responses/errorResponse" 413 } 414 } 415 }, 416 "post": { 417 "description": "add an enum case to given column of given table\nreturn the id of the enum", 418 "operationId": "addEnumCase", 419 "parameters": [ 420 { 421 "type": "string", 422 "x-go-name": "TableName", 423 "name": "table", 424 "in": "path", 425 "required": true 426 }, 427 { 428 "type": "string", 429 "x-go-name": "ColumnName", 430 "name": "column", 431 "in": "path", 432 "required": true 433 }, 434 { 435 "name": "Body", 436 "in": "body", 437 "schema": { 438 "type": "object", 439 "properties": { 440 "enumCases": { 441 "type": "array", 442 "items": { 443 "type": "string" 444 }, 445 "x-go-name": "EnumCases" 446 } 447 } 448 } 449 } 450 ], 451 "responses": { 452 "200": { 453 "$ref": "#/responses/addEnumCaseResponse" 454 }, 455 "default": { 456 "$ref": "#/responses/errorResponse" 457 } 458 } 459 } 460 } 461 }, 462 "definitions": { 463 "APIError": { 464 "type": "object", 465 "title": "APIError ...", 466 "properties": { 467 "cause": { 468 "type": "string", 469 "x-go-name": "Cause" 470 }, 471 "message": { 472 "type": "string", 473 "x-go-name": "Message" 474 } 475 }, 476 "x-go-package": "github.com/uber/aresdb/utils" 477 }, 478 "AQLQuery": { 479 "type": "object", 480 "title": "AQLQuery specifies the query on top of tables.", 481 "properties": { 482 "dimensions": { 483 "description": "Dimensions to group by on.", 484 "type": "array", 485 "items": { 486 "$ref": "#/definitions/Dimension" 487 }, 488 "x-go-name": "Dimensions" 489 }, 490 "joins": { 491 "description": "Foreign tables to be joined.", 492 "type": "array", 493 "items": { 494 "$ref": "#/definitions/Join" 495 }, 496 "x-go-name": "Joins" 497 }, 498 "measures": { 499 "description": "Measures/metrics to report.", 500 "type": "array", 501 "items": { 502 "$ref": "#/definitions/Measure" 503 }, 504 "x-go-name": "Measures" 505 }, 506 "now": { 507 "description": "This overrides \"now\" (in seconds)", 508 "type": "integer", 509 "format": "int64", 510 "x-go-name": "Now" 511 }, 512 "rowFilters": { 513 "description": "Row level filters to apply for all measures. The filters are ANDed togther.", 514 "type": "array", 515 "items": { 516 "type": "string" 517 }, 518 "x-go-name": "Filters" 519 }, 520 "table": { 521 "description": "Name of the main table.", 522 "type": "string", 523 "x-go-name": "Table" 524 }, 525 "timeFilter": { 526 "$ref": "#/definitions/TimeFilter" 527 }, 528 "timezone": { 529 "description": "Timezone to use when converting timestamp to calendar time, specified as:\n8:00\nGMT\nAmerica/Los_Angeles\ntimezone(city_id)\nregion_timezone(city_id)\nmega_region_timezone(city_id)\nsub_region_timezone(city_id)\ncountry_timezone(city_id)", 530 "type": "string", 531 "x-go-name": "Timezone" 532 } 533 }, 534 "x-go-package": "github.com/uber/aresdb/query" 535 }, 536 "AQLQueryContext": { 537 "type": "object", 538 "title": "AQLQueryContext stores all contextual data for handling an AQL query.", 539 "properties": { 540 "ReturnHLLData": { 541 "description": "whether to serialize the query result as HLLData. If ReturnHLLData is true, we will not release dimension\nvector and measure vector until serialization is done.", 542 "type": "boolean" 543 }, 544 "debug": { 545 "type": "boolean", 546 "x-go-name": "Debug" 547 }, 548 "device": { 549 "type": "integer", 550 "format": "int64", 551 "x-go-name": "Device" 552 }, 553 "error": { 554 "type": "string", 555 "x-go-name": "Error" 556 }, 557 "oopk": { 558 "$ref": "#/definitions/OOPKContext" 559 }, 560 "prefilters": { 561 "description": "Index to filters in Query.Filters that are identified as prefilters.", 562 "type": "array", 563 "items": { 564 "type": "integer", 565 "format": "int64" 566 }, 567 "x-go-name": "Prefilters" 568 }, 569 "profiling": { 570 "type": "string", 571 "x-go-name": "Profiling" 572 }, 573 "query": { 574 "$ref": "#/definitions/AQLQuery" 575 }, 576 "scanners": { 577 "description": "Scanner for all tables. [0] for the main table; [1:] for tables in joins.", 578 "type": "array", 579 "items": { 580 "$ref": "#/definitions/TableScanner" 581 }, 582 "x-go-name": "TableScanners" 583 }, 584 "tableIDs": { 585 "description": "Map from table alias to ID (index to TableScanners).", 586 "type": "object", 587 "additionalProperties": { 588 "type": "integer", 589 "format": "int64" 590 }, 591 "x-go-name": "TableIDByAlias" 592 } 593 }, 594 "x-go-package": "github.com/uber/aresdb/query" 595 }, 596 "AQLRequest": { 597 "type": "object", 598 "title": "AQLRequest contains multiple of AQLQueries.", 599 "properties": { 600 "queries": { 601 "type": "array", 602 "items": { 603 "$ref": "#/definitions/AQLQuery" 604 }, 605 "x-go-name": "Queries" 606 } 607 }, 608 "x-go-package": "github.com/uber/aresdb/query" 609 }, 610 "AQLResponse": { 611 "type": "object", 612 "title": "AQLResponse contains results for multiple AQLQueries.", 613 "properties": { 614 "context": { 615 "type": "array", 616 "items": { 617 "$ref": "#/definitions/AQLQueryContext" 618 }, 619 "x-go-name": "QueryContext" 620 }, 621 "errors": { 622 "type": "array", 623 "items": { 624 "type": "string" 625 }, 626 "x-go-name": "Errors" 627 }, 628 "results": { 629 "type": "array", 630 "items": { 631 "$ref": "#/definitions/AQLTimeSeriesResult" 632 }, 633 "x-go-name": "Results" 634 } 635 }, 636 "x-go-package": "github.com/uber/aresdb/query" 637 }, 638 "AQLTimeSeriesResult": { 639 "description": "Represents a nested AQL time series result with one dimension on each layer:\nthere is always an outermost time dimension. it stores the start time of\nthe bucket/duration (in seconds since Epoch).\nafter the time dimension, there could be zero or more layers of additional\ndimensions (all values are represented as strings). a special \"NULL\" string\nis used to represent NULL values.\nthere is always a single measure, and the measure type is either float64\nor nil (not *float64);", 640 "type": "object", 641 "title": "AQLTimeSeriesResult is ported from Apollo, see time_series_result.go", 642 "additionalProperties": { 643 "type": "object" 644 }, 645 "x-go-package": "github.com/uber/aresdb/query/common" 646 }, 647 "DimCountsPerDimWidth": { 648 "description": "DimCountsPerDimWidth defines dimension counts per dimension width\n16-byte 8-byte 4-byte 2-byte 1-byte", 649 "type": "array", 650 "items": { 651 "type": "integer", 652 "format": "uint8" 653 }, 654 "x-go-package": "github.com/uber/aresdb/query/common" 655 }, 656 "Dimension": { 657 "type": "object", 658 "title": "Dimension specifies a row level dimension for grouping by.", 659 "properties": { 660 "numericBucketizer": { 661 "$ref": "#/definitions/NumericBucketizerDef" 662 }, 663 "sqlExpression": { 664 "description": "The SQL expression for computing the dimension.\nExpr can be empty when TimeBucketizer is specified, which implies the\ndesignated time column from the main table is used as the expresssion.", 665 "type": "string", 666 "x-go-name": "Expr" 667 }, 668 "timeBucketizer": { 669 "description": "Decides how to bucketize a timestamp Dimension before grouping by.\nSee https://github.com/uber/aresdb/wiki/aql#time_bucketizer", 670 "type": "string", 671 "x-go-name": "TimeBucketizer" 672 }, 673 "timeUnit": { 674 "type": "string", 675 "x-go-name": "TimeUnit" 676 } 677 }, 678 "x-go-package": "github.com/uber/aresdb/query" 679 }, 680 "Duration": { 681 "description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.", 682 "type": "integer", 683 "format": "int64", 684 "x-go-package": "time" 685 }, 686 "Expr": { 687 "type": "object", 688 "title": "Expr represents an expression that can be evaluated to a value.", 689 "properties": { 690 "String": { 691 "type": "string" 692 }, 693 "Type": { 694 "$ref": "#/definitions/Type" 695 } 696 }, 697 "x-go-package": "github.com/uber/aresdb/query/expr" 698 }, 699 "Join": { 700 "type": "object", 701 "title": "Join specifies a secondary table to be explicitly joined in the query.", 702 "properties": { 703 "alias": { 704 "description": "Alias for the table. Empty means the table name will be used as alias.", 705 "type": "string", 706 "x-go-name": "Alias" 707 }, 708 "conditions": { 709 "description": "Condition expressions to be ANDed together for the join.", 710 "type": "array", 711 "items": { 712 "type": "string" 713 }, 714 "x-go-name": "Conditions" 715 }, 716 "table": { 717 "description": "Name of the table to join against.", 718 "type": "string", 719 "x-go-name": "Table" 720 } 721 }, 722 "x-go-package": "github.com/uber/aresdb/query" 723 }, 724 "Measure": { 725 "type": "object", 726 "title": "Measure specifies a group level aggregation measure.", 727 "properties": { 728 "rowFilters": { 729 "description": "Row level filters to apply for this measure.\nThe filters are ANDed togther.", 730 "type": "array", 731 "items": { 732 "type": "string" 733 }, 734 "x-go-name": "Filters" 735 }, 736 "sqlExpression": { 737 "description": "The SQL expression for computing the measure.", 738 "type": "string", 739 "x-go-name": "Expr" 740 } 741 }, 742 "x-go-package": "github.com/uber/aresdb/query" 743 }, 744 "NumericBucketizerDef": { 745 "description": "NumericBucketizerDef defines how numbers should be bucketized before being\ngrouped by as a dimension. The returned dimension is a string in the format\nof `lower_bound`, representing `[lower_bound, uper_bound)`.", 746 "type": "object", 747 "properties": { 748 "bucketWidth": { 749 "description": "Generates equal-width buckets. BucketWidth should be positive.\nThe generated buckets are:\n... [-2w, -w), [-w, 0), [0, w), [w, 2w) ...", 750 "type": "number", 751 "format": "double", 752 "x-go-name": "BucketWidth" 753 }, 754 "logBase": { 755 "description": "Generates exponential/log buckets. LogBase should be positive.\nThe generated buckets are:\n... [pow(b, -2), pow(b, -1)), [pow(b, -1), 1), [1, pow(b, 1)), [pow(b, 1), pow(b, 2)) ...", 756 "type": "number", 757 "format": "double", 758 "x-go-name": "LogBase" 759 }, 760 "manualPartitions": { 761 "description": "Generates a fixed number of buckets using the specified partitions.\nThe numbers should be in sorted order. The generated buckets are:\n[-inf, p0), [p0, p1), [p1, p2), ... [pn-1, inf)", 762 "type": "array", 763 "items": { 764 "type": "number", 765 "format": "double" 766 }, 767 "x-go-name": "ManualPartitions" 768 } 769 }, 770 "x-go-package": "github.com/uber/aresdb/query" 771 }, 772 "OOPKContext": { 773 "description": "OOPKContext defines additional query context for one-operator-per-kernel\nexecution.", 774 "type": "object", 775 "properties": { 776 "aggregate": { 777 "type": "integer", 778 "format": "uint32", 779 "x-go-name": "AggregateType" 780 }, 781 "archiveStats": { 782 "$ref": "#/definitions/oopkQueryStats" 783 }, 784 "deviceMem": { 785 "description": "For reporting purpose only.", 786 "type": "integer", 787 "format": "int64", 788 "x-go-name": "DeviceMemoryRequirement" 789 }, 790 "dimRowBytes": { 791 "description": "Dim row bytes is the sum number of bytes of all dimension values\nplus validity bytes, for memory allocation convenience", 792 "type": "integer", 793 "format": "int64", 794 "x-go-name": "DimRowBytes" 795 }, 796 "dimensionVectorIndex": { 797 "description": "Index of single dimension vector in global dimension vector\nFollowing sorted order based on bytes", 798 "type": "array", 799 "items": { 800 "type": "integer", 801 "format": "int64" 802 }, 803 "x-go-name": "DimensionVectorIndex" 804 }, 805 "dimensions": { 806 "description": "Compiled and annotated ASTs for dimensions and measure.", 807 "type": "array", 808 "items": { 809 "$ref": "#/definitions/Expr" 810 }, 811 "x-go-name": "Dimensions" 812 }, 813 "durationWaitedForDevice": { 814 "$ref": "#/definitions/Duration" 815 }, 816 "foreignTableCommonFilters": { 817 "description": "ForeignTableCommonFilters match filters with foreign table columns involved", 818 "type": "array", 819 "items": { 820 "$ref": "#/definitions/Expr" 821 }, 822 "x-go-name": "ForeignTableCommonFilters" 823 }, 824 "liveStats": { 825 "$ref": "#/definitions/oopkQueryStats" 826 }, 827 "mainTableCommonFilters": { 828 "description": "Filters that apply to all archive and live batches.\nMainTableCommonFilters match filters with only main table columns involved", 829 "type": "array", 830 "items": { 831 "$ref": "#/definitions/Expr" 832 }, 833 "x-go-name": "MainTableCommonFilters" 834 }, 835 "measure": { 836 "$ref": "#/definitions/Expr" 837 }, 838 "measureBytes": { 839 "type": "integer", 840 "format": "int64", 841 "x-go-name": "MeasureBytes" 842 }, 843 "numDims": { 844 "$ref": "#/definitions/DimCountsPerDimWidth" 845 }, 846 "prefilters": { 847 "description": "Prefilters that only apply to live batches.\nArchiving cutoff filtering is processed directly by the query engine and not\nincluded here (different shards may have different cutoffs).", 848 "type": "array", 849 "items": { 850 "$ref": "#/definitions/Expr" 851 }, 852 "x-go-name": "Prefilters" 853 }, 854 "resultSize": { 855 "type": "integer", 856 "format": "int64", 857 "x-go-name": "ResultSize" 858 }, 859 "timeFilters": { 860 "description": "Lower bound [0] and upper bound [1] time filter. nil if not applicable.\n[0] should be applied to the first archive batch and all live batches.\n[1] should be applied to the last archive batch and all live batches.", 861 "type": "array", 862 "items": { 863 "$ref": "#/definitions/Expr" 864 }, 865 "x-go-name": "TimeFilters" 866 } 867 }, 868 "x-go-package": "github.com/uber/aresdb/query" 869 }, 870 "TableScanner": { 871 "description": "TableScanner defines how data for a table should be fed to device memory for\nprocessing (scanner in a traditional terminology).", 872 "type": "object", 873 "properties": { 874 "archiveBatchIDEnd": { 875 "type": "integer", 876 "format": "int64", 877 "x-go-name": "ArchiveBatchIDEnd" 878 }, 879 "archiveBatchIDStart": { 880 "description": "Range of archive batches to process: [Start, end).\nDepending on the archiving progress of each shard, live batches may be\nskipped for processing if the archiving cutoff is after the time of\nArchiveBatchIDEnd.", 881 "type": "integer", 882 "format": "int64", 883 "x-go-name": "ArchiveBatchIDStart" 884 }, 885 "columnUsage": { 886 "description": "Map from column ID to its usage by the query.", 887 "x-go-name": "ColumnUsages" 888 }, 889 "columns": { 890 "description": "IDs of columns to be used in this query, in the following order:\n1. Columns not from ArchivingSortColumns.\n2. Columns from ArchivingSortColumns in reverse order.", 891 "type": "array", 892 "items": { 893 "type": "integer", 894 "format": "int64" 895 }, 896 "x-go-name": "Columns" 897 }, 898 "equalityPrefilterValues": { 899 "description": "Values of equality prefilters in order. Each 4 bytes of the uint32 is used\nto store any data type other than UUID (not supported).", 900 "type": "array", 901 "items": { 902 "type": "integer", 903 "format": "uint32" 904 }, 905 "x-go-name": "EqualityPrefilterValues" 906 }, 907 "rangePrefilterBoundaries": { 908 "description": "Boundary types and values of the final range prefilter.", 909 "type": "array", 910 "items": { 911 "$ref": "#/definitions/boundaryType" 912 }, 913 "x-go-name": "RangePrefilterBoundaries" 914 }, 915 "rangePrefilterValues": { 916 "type": "array", 917 "items": { 918 "type": "integer", 919 "format": "uint32" 920 }, 921 "x-go-name": "RangePrefilterValues" 922 }, 923 "shards": { 924 "description": "IDS of all table shards to be scanned on this instance.", 925 "type": "array", 926 "items": { 927 "type": "integer", 928 "format": "int64" 929 }, 930 "x-go-name": "Shards" 931 } 932 }, 933 "x-go-package": "github.com/uber/aresdb/query" 934 }, 935 "TimeFilter": { 936 "type": "object", 937 "title": "TimeFilter is a syntax sugar for specifying time range.", 938 "properties": { 939 "column": { 940 "description": "A table time column in the format of column, or table_alias.column.\nWhen empty, it defaults to the designated time column of the main table.", 941 "type": "string", 942 "x-go-name": "Column" 943 }, 944 "from": { 945 "description": "The time specified in from and to are both inclusive.\nSee https://github.com/uber/aresdb/wiki/aql#time_filter", 946 "type": "string", 947 "x-go-name": "From" 948 }, 949 "to": { 950 "type": "string", 951 "x-go-name": "To" 952 } 953 }, 954 "x-go-package": "github.com/uber/aresdb/query" 955 }, 956 "Type": { 957 "description": "Expression types are determined at query compilation time, type castings are\ngenerated when apprioperiate. Notice that word widths are not specified here.", 958 "type": "integer", 959 "format": "int64", 960 "title": "Type defines data types for expression evaluation.", 961 "x-go-package": "github.com/uber/aresdb/query/expr" 962 }, 963 "boundaryType": { 964 "type": "integer", 965 "format": "int64", 966 "x-go-package": "github.com/uber/aresdb/query" 967 }, 968 "column": { 969 "type": "object", 970 "title": "Column defines the schema of a column from MetaStore.", 971 "properties": { 972 "caseInsensitive": { 973 "description": "Whether to compare characters case insensitively for enum columns. It only matters\nfor ingestion client as it's the place to concert enum strings to enum values.", 974 "type": "boolean", 975 "x-go-name": "CaseInsensitive" 976 }, 977 "config": { 978 "$ref": "#/definitions/columnConfig" 979 }, 980 "defaultValue": { 981 "description": "We store the default value as string here since it's from user input.\nNil means the default value is NULL. Actual default value of column data type\nshould be stored in memstore.", 982 "type": "string", 983 "x-go-name": "DefaultValue" 984 }, 985 "deleted": { 986 "description": "Deleted columns are kept as placeholders in Table.Columns.", 987 "type": "boolean", 988 "x-go-name": "Deleted", 989 "readOnly": true 990 }, 991 "disableAutoExpand": { 992 "description": "Whether disable enum cases auto expansion.", 993 "type": "boolean", 994 "x-go-name": "DisableAutoExpand" 995 }, 996 "name": { 997 "description": "Immutable, columns cannot be renamed.", 998 "type": "string", 999 "x-go-name": "Name" 1000 }, 1001 "type": { 1002 "description": "Immutable, columns cannot have their types changed.", 1003 "type": "string", 1004 "x-go-name": "Type" 1005 } 1006 }, 1007 "x-go-name": "Column", 1008 "x-go-package": "github.com/uber/aresdb/metastore/common" 1009 }, 1010 "columnConfig": { 1011 "description": "ColumnConfig defines the schema of a column config that can be mutated by\nUpdateColumn API call.", 1012 "type": "object", 1013 "properties": { 1014 "preloadingDays": { 1015 "description": "ColumnEvictionConfig : For column level in-memory eviction, it’s the best\neffort TTL for in-memory data.\nColumn level eviction has nothing to do with data availability, but based\non how much data we pre-loaded, the major impact will be there for query\nperformance. Here we bring in two priorities configs: Preloading days and\nPriority.\nPreloading days is defined at each column level to indicate how many\nrecent days data we want to preload to host memory. This is best effort\noperation.\nPriority is defined at each column level to indicate the priority of\neach column. When data eviction happens, we will rely on column priority\nto decide which column will be evicted first.\nHigh number implies high priority.", 1016 "type": "integer", 1017 "format": "int64", 1018 "x-go-name": "PreloadingDays" 1019 }, 1020 "priority": { 1021 "type": "integer", 1022 "format": "int64", 1023 "x-go-name": "Priority" 1024 } 1025 }, 1026 "x-go-name": "ColumnConfig", 1027 "x-go-package": "github.com/uber/aresdb/metastore/common" 1028 }, 1029 "oopkQueryStats": { 1030 "type": "object", 1031 "title": "oopkQueryStats stores the overall stats for a query.", 1032 "properties": { 1033 "batches": { 1034 "description": "Total number of batches.", 1035 "type": "integer", 1036 "format": "int64", 1037 "x-go-name": "NumBatches" 1038 }, 1039 "latency": { 1040 "description": "Total timing for all query stages **including transfer**.", 1041 "type": "number", 1042 "format": "double", 1043 "x-go-name": "TotalTiming" 1044 }, 1045 "numBatchSkipped": { 1046 "description": "For archive batch, we skip process empty batch. For live batch, we will skip it\nif its min or max value does not pass main table filters or time filters.", 1047 "type": "integer", 1048 "format": "int64", 1049 "x-go-name": "NumBatchSkipped" 1050 }, 1051 "records": { 1052 "description": "Total number of records processed on GPU.\nA record could represent multiple data record if firstColumn is compressed.", 1053 "type": "integer", 1054 "format": "int64", 1055 "x-go-name": "NumRecords" 1056 }, 1057 "stages": { 1058 "description": "mapping from stage name to stage stats.", 1059 "x-go-name": "Name2Stage" 1060 }, 1061 "tranBytes": { 1062 "description": "Stats for input data transferred via PCIe.", 1063 "type": "integer", 1064 "format": "int64", 1065 "x-go-name": "BytesTransferred" 1066 }, 1067 "tranCalls": { 1068 "type": "integer", 1069 "format": "int64", 1070 "x-go-name": "NumTransferCalls" 1071 } 1072 }, 1073 "x-go-package": "github.com/uber/aresdb/query" 1074 }, 1075 "table": { 1076 "type": "object", 1077 "title": "Table defines the schema and configurations of a table from MetaStore.", 1078 "properties": { 1079 "archivingSortColumns": { 1080 "description": "Fact table only.\nIDs of columns to sort based upon.", 1081 "type": "array", 1082 "items": { 1083 "type": "integer", 1084 "format": "int64" 1085 }, 1086 "x-go-name": "ArchivingSortColumns" 1087 }, 1088 "columns": { 1089 "description": "Index to Columns also serves as column IDs.", 1090 "type": "array", 1091 "items": { 1092 "$ref": "#/definitions/column" 1093 }, 1094 "x-go-name": "Columns" 1095 }, 1096 "config": { 1097 "$ref": "#/definitions/tableConfig" 1098 }, 1099 "isFactTable": { 1100 "description": "Whether this is a fact table.", 1101 "type": "boolean", 1102 "x-go-name": "IsFactTable" 1103 }, 1104 "name": { 1105 "description": "Name of the table, immutable.", 1106 "type": "string", 1107 "x-go-name": "Name" 1108 }, 1109 "primaryKeyColumns": { 1110 "description": "IDs of primary key columns. This field is immutable.", 1111 "type": "array", 1112 "items": { 1113 "type": "integer", 1114 "format": "int64" 1115 }, 1116 "x-go-name": "PrimaryKeyColumns" 1117 }, 1118 "version": { 1119 "type": "integer", 1120 "format": "int64", 1121 "x-go-name": "Version" 1122 } 1123 }, 1124 "x-go-name": "Table", 1125 "x-go-package": "github.com/uber/aresdb/metastore/common" 1126 }, 1127 "tableConfig": { 1128 "description": "TableConfig defines the table configurations that can be changed", 1129 "type": "object", 1130 "properties": { 1131 "archivingDelayMinutes": { 1132 "description": "Number of minutes after event time before a record can be archived.", 1133 "type": "integer", 1134 "format": "uint32", 1135 "x-go-name": "ArchivingDelayMinutes" 1136 }, 1137 "archivingIntervalMinutes": { 1138 "description": "Specifies how often archiving runs.", 1139 "type": "integer", 1140 "format": "uint32", 1141 "x-go-name": "ArchivingIntervalMinutes" 1142 }, 1143 "backfillIntervalMinutes": { 1144 "description": "Specifies how often backfill runs.", 1145 "type": "integer", 1146 "format": "uint32", 1147 "x-go-name": "BackfillIntervalMinutes" 1148 }, 1149 "backfillMaxBufferSize": { 1150 "description": "Upper limit of current backfill buffer size + backfilling buffer size.", 1151 "type": "integer", 1152 "format": "int64", 1153 "x-go-name": "BackfillMaxBufferSize" 1154 }, 1155 "backfillStoreBatchSize": { 1156 "description": "Size of each live batch used by backfill job.", 1157 "type": "integer", 1158 "format": "int64", 1159 "x-go-name": "BackfillStoreBatchSize" 1160 }, 1161 "backfillThresholdInBytes": { 1162 "description": "Backfill buffer size in bytes that will trigger a backfill job.", 1163 "type": "integer", 1164 "format": "int64", 1165 "x-go-name": "BackfillThresholdInBytes" 1166 }, 1167 "batchSize": { 1168 "description": "Size of each live batch, should be sufficiently large.", 1169 "type": "integer", 1170 "format": "int64", 1171 "x-go-name": "BatchSize" 1172 }, 1173 "initPrimaryKeyNumBuckets": { 1174 "description": "Initial setting of number of buckets for primary key\nif equals to 0, default will be used", 1175 "type": "integer", 1176 "format": "int64", 1177 "x-go-name": "InitialPrimaryKeyNumBuckets" 1178 }, 1179 "maxRedoLogFileSize": { 1180 "description": "Specifies the size limit of a single redo log file.", 1181 "type": "integer", 1182 "format": "int64", 1183 "x-go-name": "MaxRedoLogFileSize" 1184 }, 1185 "recordRetentionInDays": { 1186 "description": "Records with timestamp older than now - RecordRetentionInDays will be skipped\nduring ingestion and backfill. 0 means unlimited days.", 1187 "type": "integer", 1188 "format": "int64", 1189 "x-go-name": "RecordRetentionInDays" 1190 }, 1191 "redoLogRotationInterval": { 1192 "description": "Specifies how often to create a new redo log file.", 1193 "type": "integer", 1194 "format": "int64", 1195 "x-go-name": "RedoLogRotationInterval" 1196 }, 1197 "snapshotIntervalMinutes": { 1198 "description": "Specifies how often snapshot runs.", 1199 "type": "integer", 1200 "format": "int64", 1201 "x-go-name": "SnapshotIntervalMinutes" 1202 }, 1203 "snapshotThreshold": { 1204 "description": "Number of mutations to accumulate before creating a new snapshot.", 1205 "type": "integer", 1206 "format": "int64", 1207 "x-go-name": "SnapshotThreshold" 1208 } 1209 }, 1210 "x-go-name": "TableConfig", 1211 "x-go-package": "github.com/uber/aresdb/metastore/common" 1212 } 1213 }, 1214 "responses": { 1215 "addEnumCaseResponse": { 1216 "description": "AddEnumCaseResponse represents AddEnumCase response.", 1217 "schema": { 1218 "type": "array", 1219 "items": { 1220 "type": "integer", 1221 "format": "int64" 1222 } 1223 } 1224 }, 1225 "aqlResponse": { 1226 "description": "AQLResponse represents queryAQL response.", 1227 "schema": { 1228 "$ref": "#/definitions/AQLResponse" 1229 } 1230 }, 1231 "errorResponse": { 1232 "description": "ErrorResponse represents error response.", 1233 "schema": { 1234 "$ref": "#/definitions/APIError" 1235 } 1236 }, 1237 "getTableResponse": { 1238 "description": "GetTableResponse represents GetTable response.", 1239 "schema": { 1240 "$ref": "#/definitions/table" 1241 } 1242 }, 1243 "listEnumCasesResponse": { 1244 "description": "ListEnumCasesResponse represents ListEnumCases response.", 1245 "schema": { 1246 "type": "array", 1247 "items": { 1248 "type": "string" 1249 } 1250 } 1251 }, 1252 "noContentResponse": { 1253 "description": "NoContentResponse represents Response with no content." 1254 }, 1255 "stringArrayResponse": { 1256 "description": "StringArrayResponse represents string array response.", 1257 "schema": { 1258 "type": "array", 1259 "items": { 1260 "type": "string" 1261 } 1262 } 1263 } 1264 } 1265 }