You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/06/24 15:38:29 UTC

incubator-kudu git commit: Fix syntax highlighting on new Jekyll

Repository: incubator-kudu
Updated Branches:
  refs/heads/gh-pages f70ddde2f -> 1c4d97443


Fix syntax highlighting on new Jekyll

When we moved from github to our own Jekyll build, the syntax highlighting of
code snippets on blog posts changed. Now we need to use the Liquid template
syntax instead of the '```' markdown syntax.

Change-Id: Ib3763d74037cd9d25aac72f82123af51ec049dec
Reviewed-on: http://gerrit.cloudera.org:8080/3479
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
Tested-by: Jean-Daniel Cryans <jd...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/1c4d9744
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/1c4d9744
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/1c4d9744

Branch: refs/heads/gh-pages
Commit: 1c4d9744361658ff2a34ec37071425368be55dc8
Parents: f70ddde
Author: Todd Lipcon <to...@cloudera.com>
Authored: Thu Jun 23 17:18:46 2016 -0700
Committer: Jean-Daniel Cryans <jd...@apache.org>
Committed: Fri Jun 24 15:37:43 2016 +0000

----------------------------------------------------------------------
 ...6-04-19-kudu-0-8-0-predicate-improvements.md |  8 +--
 _posts/2016-06-02-no-default-partitioning.md    | 12 ++--
 css/kudu.css                                    | 66 +++++++++++++++++++-
 3 files changed, 75 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/1c4d9744/_posts/2016-04-19-kudu-0-8-0-predicate-improvements.md
----------------------------------------------------------------------
diff --git a/_posts/2016-04-19-kudu-0-8-0-predicate-improvements.md b/_posts/2016-04-19-kudu-0-8-0-predicate-improvements.md
index 2d86467..1815178 100644
--- a/_posts/2016-04-19-kudu-0-8-0-predicate-improvements.md
+++ b/_posts/2016-04-19-kudu-0-8-0-predicate-improvements.md
@@ -24,7 +24,7 @@ prune entire tablets during scans. For example, for the following schema and
 query Kudu will now be able to skip scanning 15 out of the 16 tablets in the
 table:
 
-```SQL
+{% highlight sql %}
 -- create a table with 16 tablets
 CREATE TABLE users (id INT64, name STRING, address STRING)
 DISTRIBUTE BY HASH (id) INTO 16 BUCKETS;
@@ -32,7 +32,7 @@ DISTRIBUTE BY HASH (id) INTO 16 BUCKETS;
 -- scan over a single tablet
 SELECT id, name, address FROM users
 WHERE id = 876932;
-```
+{% endhighlight %}
 
 For a deeper look at the newly implemented scan and partition pruning
 optimizations, see the associated [design
@@ -52,7 +52,7 @@ specifying exclusive, as well as inclusive, range predicates. The existing
 API has been deprecated, and will be removed soon. Example of transitioning from
 the old to new API:
 
-```java
+{% highlight java %}
 ColumnSchema myIntColumnSchema = ...;
 KuduScanner.KuduScannerBuilder scannerBuilder = ...;
 
@@ -64,7 +64,7 @@ scannerBuilder.addColumnRangePredicate(predicate);
 // New predicate API
 scannerBuilder.newPredicate(
     KuduPredicate.newComparisonPredicate(myIntColumnSchema, ComparisonOp.GREATER_EQUAL, 20));
-```
+{% endhighlight %}
 
 ## Under the Covers Changes
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/1c4d9744/_posts/2016-06-02-no-default-partitioning.md
----------------------------------------------------------------------
diff --git a/_posts/2016-06-02-no-default-partitioning.md b/_posts/2016-06-02-no-default-partitioning.md
index 68a9be5..fb2a938 100644
--- a/_posts/2016-06-02-no-default-partitioning.md
+++ b/_posts/2016-06-02-no-default-partitioning.md
@@ -51,27 +51,27 @@ With the C++ client, creating a new table with hash partitions is as simple as
 calling `KuduTableCreator:add_hash_partitions` with the columns to hash and the
 number of buckets to use:
 
-```cpp
+{% highlight cpp %}
 unique_ptr<KuduTableCreator> table_creator(my_client->NewTableCreator());
 Status create_status = table_creator->table_name("my-table")
                                      .schema(my_schema)
                                      .add_hash_partitions({ "key_column_a", "key_column_b" }, 16)
                                      .Create();
 if (!create_status.ok() { /* handle error */ }
-```
+{% endhighlight %}
 
 Java Client
 ===========
 
 And similarly, in Java:
 
-```java
+{% highlight java %}
 List<String> hashColumns = new ArrayList<>();
 hashColumns.add("key_column_a");
 hashColumn.add("key_column_b");
 CreateTableOptions options = new CreateTableOptions().addHashPartitions(hashColumns, 16);
 myClient.createTable("my-table", my_schema, options);
-```
+{% endhighlight %}
 
 In the examples above, if the hash partition configuration is omitted the create
 table operation will fail with the error `Table partitioning must be specified
@@ -85,7 +85,7 @@ Impala
 When creating Kudu tables with Impala, the formerly optional `DISTRIBUTE BY`
 clause is now required:
 
-```SQL
+{% highlight SQL %}
 CREATE TABLE my_table (key_column_a STRING, key_column_b STRING, other_column STRING)
 DISTRIBUTE BY HASH (key_column_a, key_column_b) INTO 16 BUCKETS
 TBLPROPERTIES(
@@ -94,4 +94,4 @@ TBLPROPERTIES(
     'kudu.master_addresses' = 'kudu-master.example.com:7051',
     'kudu.key_columns' = 'key_column_a,key_column_b'
 );
-```
+{% endhighlight %}

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/1c4d9744/css/kudu.css
----------------------------------------------------------------------
diff --git a/css/kudu.css b/css/kudu.css
index 7d5b8b9..cad01f8 100644
--- a/css/kudu.css
+++ b/css/kudu.css
@@ -229,4 +229,68 @@ article .read-full {
   padding: 0.5em 0;
   margin: 0;
   border-bottom: 1px solid #eee;
-}
\ No newline at end of file
+}
+
+/* ------------------------------------------
+   Syntax highlighting for Jekyll
+   ------------------------------------- */
+.highlight  { background: #ffffff; }
+.highlight .c { color: #999988; font-style: italic } /* Comment */
+.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
+.highlight .k { font-weight: bold } /* Keyword */
+.highlight .o { font-weight: bold } /* Operator */
+.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
+.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
+.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #aa0000 } /* Generic.Error */
+.highlight .gh { color: #999999 } /* Generic.Heading */
+.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
+.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #555555 } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
+.highlight .gt { color: #aa0000 } /* Generic.Traceback */
+.highlight .kc { font-weight: bold } /* Keyword.Constant */
+.highlight .kd { font-weight: bold } /* Keyword.Declaration */
+.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #009999 } /* Literal.Number */
+.highlight .s { color: #d14 } /* Literal.String */
+.highlight .na { color: #008080 } /* Name.Attribute */
+.highlight .nb { color: #0086B3 } /* Name.Builtin */
+.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
+.highlight .no { color: #008080 } /* Name.Constant */
+.highlight .ni { color: #800080 } /* Name.Entity */
+.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
+.highlight .nn { color: #555555 } /* Name.Namespace */
+.highlight .nt { color: #000080 } /* Name.Tag */
+.highlight .nv { color: #008080 } /* Name.Variable */
+.highlight .ow { font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mf { color: #009999 } /* Literal.Number.Float */
+.highlight .mh { color: #009999 } /* Literal.Number.Hex */
+.highlight .mi { color: #009999 } /* Literal.Number.Integer */
+.highlight .mo { color: #009999 } /* Literal.Number.Oct */
+.highlight .sb { color: #d14 } /* Literal.String.Backtick */
+.highlight .sc { color: #d14 } /* Literal.String.Char */
+.highlight .sd { color: #d14 } /* Literal.String.Doc */
+.highlight .s2 { color: #d14 } /* Literal.String.Double */
+.highlight .se { color: #d14 } /* Literal.String.Escape */
+.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
+.highlight .si { color: #d14 } /* Literal.String.Interpol */
+.highlight .sx { color: #d14 } /* Literal.String.Other */
+.highlight .sr { color: #009926 } /* Literal.String.Regex */
+.highlight .s1 { color: #d14 } /* Literal.String.Single */
+.highlight .ss { color: #990073 } /* Literal.String.Symbol */
+.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
+.highlight .vc { color: #008080 } /* Name.Variable.Class */
+.highlight .vg { color: #008080 } /* Name.Variable.Global */
+.highlight .vi { color: #008080 } /* Name.Variable.Instance */
+.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */