File tree Expand file tree Collapse file tree 4 files changed +6
-10
lines changed
appengine-java8/bigtable/src
java/com/example/bigtable
test/java/com/example/bigtable Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 3030import org .apache .hadoop .hbase .client .Scan ;
3131import org .apache .hadoop .hbase .client .Table ;
3232import org .apache .hadoop .hbase .util .Bytes ;
33- // [START example ]
33+ // [START bigtable_app_engine_standard_hw ]
3434
3535/**
3636 * A minimal application that connects to Cloud Bigtable using the native HBase API and performs
@@ -63,7 +63,6 @@ public static String create(Connection connection) {
6363 descriptor .addFamily (new HColumnDescriptor (COLUMN_FAMILY_NAME ));
6464
6565 admin .createTable (descriptor );
66- // [END creating_a_table]
6766 } catch (IOException e ) {
6867 return "Table exists." ;
6968 }
@@ -110,7 +109,7 @@ public static String doHelloWorld() {
110109 Result getResult = table .get (new Get (Bytes .toBytes (rowKey )));
111110 String greeting = Bytes .toString (getResult .getValue (COLUMN_FAMILY_NAME , COLUMN_NAME ));
112111 result .append ("Get a single greeting by row key<br>" );
113- // [END getting_a_row]
112+
114113 result .append (" " );
115114 result .append (rowKey );
116115 result .append ("= " );
@@ -138,4 +137,4 @@ public static String doHelloWorld() {
138137 return result .toString ();
139138 }
140139}
141- // [END example ]
140+ // [END bigtable_app_engine_standard_hw ]
Original file line number Diff line number Diff line change @@ -100,10 +100,10 @@ public void contextInitialized(ServletContextEvent event) {
100100 }
101101
102102 if (PROJECT_ID == null ) {
103- PROJECT_ID = System .getProperty ("BIGTABLE_PROJECT " );
103+ PROJECT_ID = System .getProperty ("bigtable.projectID " );
104104 }
105105 if (INSTANCE_ID == null ) {
106- INSTANCE_ID = System .getProperty ("BIGTABLE_INSTANCE " );
106+ INSTANCE_ID = System .getProperty ("bigtable.instanceID " );
107107 }
108108
109109 try {
Original file line number Diff line number Diff line change 1111 See the License for the specific language governing permissions and
1212 limitations under the License.
1313-->
14- <!-- [START config] -->
1514<appengine-web-app xmlns =" http://appengine.google.com/ns/1.0" >
1615 <threadsafe >true</threadsafe >
1716 <runtime >java8</runtime >
2221 <property name =" java.util.logging.config.file" value =" WEB-INF/logging.properties" />
2322 </system-properties >
2423</appengine-web-app >
25- <!-- [END config] -->
Original file line number Diff line number Diff line change 2525
2626/** Unit tests for {@link BigtableHelloWorld}. */
2727@ RunWith (JUnit4 .class )
28- @ SuppressWarnings ("checkstyle:abbreviationaswordinname" )
29- public class ITBigtableHelloWorld {
28+ public class BigtableHelloWorldTests {
3029
3130 private BigtableHelper helper ;
3231
You can’t perform that action at this time.
0 commit comments