You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by ji...@apache.org on 2016/11/18 21:25:24 UTC
[3/3] incubator-quickstep git commit: Initial commit
Initial commit
Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/c618f9ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/c618f9ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/c618f9ec
Branch: refs/heads/viz
Commit: c618f9ec1182bef7a6c4bdf3be316b03a723137c
Parents: 7095987
Author: Jianqiao Zhu <ji...@cs.wisc.edu>
Authored: Tue Nov 15 22:43:27 2016 -0600
Committer: Jianqiao Zhu <ji...@cs.wisc.edu>
Committed: Fri Nov 18 15:25:05 2016 -0600
----------------------------------------------------------------------
CMakeLists.txt | 7 +-
cli/QuickstepCli.cpp | 14 +-
third_party/json/json.hpp | 10794 ++++++++++++++++++++++++++++
viz/CMakeLists.txt | 66 +
viz/VizAnalyzer.cpp | 97 +
viz/VizAnalyzer.hpp | 116 +
viz/VizContext.cpp | 51 +
viz/VizContext.hpp | 133 +
viz/VizEngine.cpp | 74 +
viz/VizEngine.hpp | 60 +
viz/VizHelper.cpp | 76 +
viz/VizHelper.hpp | 62 +
viz/VizObject.cpp | 64 +
viz/VizObject.hpp | 120 +
viz/configs/BarChart.hpp | 78 +
viz/configs/CMakeLists.txt | 48 +
viz/configs/DumpRelation.hpp | 79 +
viz/configs/VizConfig.cpp | 91 +
viz/configs/VizConfig.hpp | 68 +
viz/rules/CMakeLists.txt | 43 +
viz/rules/Grouping.hpp | 100 +
viz/rules/OneDimensionOneMeasure.hpp | 73 +
viz/rules/VizRule.hpp | 68 +
23 files changed, 12379 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/c618f9ec/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6191de0..bb069a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -725,6 +725,9 @@ if (ENABLE_DISTRIBUTED)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/third_party/tmb/include)
endif()
+# Add third_party json (temporary).
+include_directories("${THIRD_PARTY_SOURCE_DIR}/json")
+
# Add all of the module subdirectories. CMakeLists.txt in each of the subdirectories
# defines how to build that module's libraries.
add_subdirectory(catalog)
@@ -740,6 +743,7 @@ add_subdirectory(threading)
add_subdirectory(transaction)
add_subdirectory(types)
add_subdirectory(utility)
+add_subdirectory(viz)
add_subdirectory(yarn)
# Build the quickstep_cli_shell executable.
@@ -775,7 +779,8 @@ target_link_libraries(quickstep_cli_shell
quickstep_utility_Macros
quickstep_utility_PtrVector
quickstep_utility_SqlError
- quickstep_utility_StringUtil)
+ quickstep_utility_StringUtil
+ quickstep_viz_VizHelper)
if (ENABLE_HDFS)
target_link_libraries(quickstep_cli_shell
quickstep_storage_FileManagerHdfs)
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/c618f9ec/cli/QuickstepCli.cpp
----------------------------------------------------------------------
diff --git a/cli/QuickstepCli.cpp b/cli/QuickstepCli.cpp
index 31215f6..a506cd6 100644
--- a/cli/QuickstepCli.cpp
+++ b/cli/QuickstepCli.cpp
@@ -82,6 +82,7 @@ typedef quickstep::LineReaderDumb LineReaderImpl;
#include "utility/PtrVector.hpp"
#include "utility/SqlError.hpp"
#include "utility/StringUtil.hpp"
+#include "viz/VizHelper.hpp"
#include "gflags/gflags.h"
@@ -361,7 +362,7 @@ int main(int argc, char* argv[]) {
&storage_manager,
-1, // Don't pin the Foreman thread.
num_numa_nodes_system,
- quickstep::FLAGS_profile_and_report_workorder_perf || quickstep::FLAGS_visualize_execution_dag);
+ true /* profile_individual_workorders */);
// Start the worker threads.
for (Worker &worker : workers) {
@@ -456,7 +457,16 @@ int main(int argc, char* argv[]) {
main_thread_client_id, &bus);
end = std::chrono::steady_clock::now();
- const CatalogRelation *query_result_relation = query_handle->getQueryResultRelation();
+ const CatalogRelation *query_result_relation =
+ query_handle->getQueryResultRelation();
+
+ quickstep::viz::VizHelper::Visualize(statement,
+ query_handle->getQueryPlanMutable(),
+ &foreman.getWorkOrderProfilingResults(query_handle->query_id()),
+ query_result_relation,
+ query_processor->getDefaultDatabase(),
+ query_processor->getStorageManager());
+
if (query_result_relation) {
PrintToScreen::PrintRelation(*query_result_relation,
&storage_manager,