File tree Expand file tree Collapse file tree 4 files changed +6
-10
lines changed
appengine-java8/bigtable/src <
10000
/div>
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 30
30
import org .apache .hadoop .hbase .client .Scan ;
31
31
import org .apache .hadoop .hbase .client .Table ;
32
32
import org .apache .hadoop .hbase .util .Bytes ;
33
- // [START example ]
33
+ // [START bigtable_app_engine_standard_hw ]
34
34
35
35
/**
36
36
* 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) {
63
63
descriptor .addFamily (new HColumnDescriptor (COLUMN_FAMILY_NAME ));
64
64
65
65
admin .createTable (descriptor );
66
- // [END creating_a_table]
67
66
} catch (IOException e ) {
68
67
return "Table exists." ;
69
68
}
@@ -110,7 +109,7 @@ public static String doHelloWorld() {
110
109
Result getResult = table .get (new Get (Bytes .toBytes (rowKey )));
111
110
String greeting = Bytes .toString (getResult .getValue (COLUMN_FAMILY_NAME , COLUMN_NAME ));
112
111
result .append ("Get a single greeting by row key<br>" );
113
- // [END getting_a_row]
112
+
114
113
result .append (" " );
115
114
result .append (rowKey );
116
115
result .append ("= " );
@@ -138,4 +137,4 @@ public static String doHelloWorld() {
138
137
return result .toString ();
139
138
}
140
139
}
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) {
100
100
}
101
101
102
102
if (PROJECT_ID == null ) {
103
- PROJECT_ID = System .getProperty ("BIGTABLE_PROJECT " );
103
+ PROJECT_ID = System .getProperty ("bigtable.projectID " );
104
104
}
105
105
if (INSTANCE_ID == null ) {
106
- INSTANCE_ID = System .getProperty ("BIGTABLE_INSTANCE " );
106
+ INSTANCE_ID = System .getProperty ("bigtable.instanceID " );
107
107
}
108
108
109
109
try {
Original file line number Diff line number Diff line change 11
11
See the License for the specific language governing permissions and
12
12
limitations under the License.
13
13
-->
14
- <!-- [START config] -->
15
14
<appengine-web-app xmlns =" http://appengine.google.com/ns/1.0" >
16
15
<threadsafe >true</threadsafe >
17
16
<runtime >java8</runtime >
22
21
<property name =" java.util.logging.config.file" value =" WEB-INF/logging.properties" />
23
22
</system-properties >
24
23
</appengine-web-app >
25
- <!-- [END config] -->
Original file line number Diff line number Diff line change 25
25
26
26
/** Unit tests for {@link BigtableHelloWorld}. */
27
27
@ RunWith (JUnit4 .class )
28
- @ SuppressWarnings ("checkstyle:abbreviationaswordinname" )
29
- public class ITBigtableHelloWorld {
28
+ public class BigtableHelloWorldTests {
30
29
31
30
private BigtableHelper helper ;
32
31
You can’t perform that action at this time.
0 commit comments